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]