[ 
http://issues.apache.org/jira/browse/APOLLO-40?page=comments#action_12313849 ] 

Sal Campana commented on APOLLO-40:
-----------------------------------

I also had added "synchronize" to the getLock(..) method in 
AbstractResourceHome....I have checked it in for now, however I suspect it had 
nothing to do with the fix....We tested with just it in place the problem still 
occurred, however I do not want to remove until we are sure we've fixed the 
issue...just in case

> Deadlock in AbstractResourceHome.find()
> ---------------------------------------
>
>          Key: APOLLO-40
>          URL: http://issues.apache.org/jira/browse/APOLLO-40
>      Project: Apollo
>         Type: Bug
>   Components: Other
>     Reporter: Sal Campana

>
> We need to build a unit test around this and expose the issue...
> Basically when we call createInstance in the implemented home it calls to 
> find()...This method is locking up...I haven't looked closely yet but I 
> suspect we may be using a Hashmap instead of a Hashtable (synchronized) for 
> the lookup table....
> My resolution was to create a lock object in the the implemented home and 
> wrapped the call to find() in a synchronized block....This seems to fix the 
> issue...
> //concrete home impl...createInstance(..) method
> private static Object m_lock = new Object(); //class variable..not local!
> ....
> synchronized(m_lock)
> {
>    find(resourceKey);
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to