Atomikos Forum |
|
Hi,
below is the code which I think produces race condition: synchronized ( Configuration.class ) { // synchronized to avoid case 61740 ret = new TemporaryXATransactionalResource(xares); // cf case 61740: check for concurrent additions before this synch block was entered if ( Configuration.getResource ( ret.getName() ) == null ) { if(LOGGER.isDebugEnabled()){ LOGGER.logDebug("constructing new temporary resource " + "for unknown XAResource: " + xares); } Configuration.addResource ( ret ); } } There should be an else block else { ret = Configuration.getResource ( ret.getName() ); } |