Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.1.3
-
Fix Version/s: 3.0.0
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
Description
the bug in JmsPooledConnection class method
protected Session createSession(boolean transacted, int acknowledgeMode).
the code execute 2 lines without any synchronization
DualSessionWrapper sessionHandle = getNotAccessibleSession();
and
sessionHandle.setState(XAResourceHolder.STATE_ACCESSIBLE);
getNotAccessibleSession() based on sessionHandle.getState() == XAResourceHolder.STATE_NOT_ACCESSIBLE.
So 2 thread can executes getNotAccessibleSession() in asynchronous execution and get one instance of DualSessionWrapper.
I can reproduce the bug when have staerted and commined session and after that execute code which get new session send message and close session.
(I didn't notice you already submitted a patch) - Thanks for the report, I'm going to have a look at your patch and come back to you shortly.