| Summary: | Potential for deadlock in JSFAppConfigManager init | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Java Server Faces | Reporter: | Andrew McCulloch <Andrew.McCulloch> | ||||||
| Component: | Core | Assignee: | Carlin Rogers <carlin.rogers> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | alexander.smirnoff, Andrew.McCulloch, cameron.bateman, carlin.rogers, gerry.kessler, raghunathan.srinivasan | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 3.2.3 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Andrew McCulloch
Build id: M20100909-0800 Created attachment 184082 [details]
Proposed lock ordering patch.
This proposed patch adds 2 protected methods to the internal base class of bath JSFAppConfigManagerFactory classes. There are default implementations to both methods so no other implementor will have to make changes. The two JSFAppConfigManagerFactory classes now implement these methods to allow checking of thread locking status and taking a project scheduling rule before taking a lock on the ResourceSingletonObjectManager instance monitor. This insures a consistent lock ordering.
An IAdaptble object is produced as the result of the first new method and is passesd as a parameter to the second new method which allows the implementations to conditionally release a scheduling rule without having to maintain state between calls on their own which would be difficult as they are static instances.
Looks good, checked in. Thanks for the patch Andrew. Created attachment 184157 [details]
Proposed lock ordering patch
Additional change required to avoid locking on JSFAppConfigManagerFactory.class monitor while acquiring rule.
Additional modification to avoid locking on JSFAppConfigManagerFactory.class monitor while acquiring rule has been committed. |