The obvious fix here is to synchronize all methods that read or
write instanceMap.  That would include getObjectInstance, which
makes me worry a little about performance impacts.  I am not a JNDI
expert and I get dizzy when I try to trace how tomcat actually
creates and manages datasource instances.  Should I worry about the
performance impacts of adding the syncs necessary to make this class
threadsafe?

It is interesting that given that this code is > 8 years old, this
is the first time a concurrency issue has been reported.

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to