Details
- 
        Type:
 Bug
            
         - 
        Status:
 Closed
            
                     - 
            Priority:
 Major
                
             - 
            Resolution: Fixed
 - 
            Affects Version/s: 1.0
 - 
            Fix Version/s: 1-1-beta-2
 - 
            Component/s: None
 - 
            Labels:None
 - 
            Environment:Example: High Traffic Webapp, context-scoped container with non-lifecycle singleton
 
- 
                        Number of attachments :
 
Description
Currently CachingComponentAdapter doesn't do anything to make sure the underlying ComponentInstance is only created once.
I'd like to get some comments on how we should handle this. I think the safest way is to just make CachingComponentAdapter.getComponentInstance synchronized but there might be some people who don't like that (which I can understand). However everything else might leak.
I got a testcase to show the problem. (Requires Doug Lea's concurrent libary since I wanted a safe countdown ![]()
Activity
| Field | Original Value | New Value | 
|---|---|---|
| Attachment | PicoRaceTest.java [ 12331 ] | 
| Status | Open [ 1 ] | Closed [ 6 ] | 
| Fix Version/s | 1-1-beta-2 [ 11243 ] | |
| Resolution | Fixed [ 1 ] | 
results may vary depending on your system. On one of my systems the test-case passes fine until I adjust the Thread.sleep to about 500. On my main machine I can run it with Thread.sleep(2) and it will fail.