Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
XASessionImpl creates three AMQP Sessions...
1) it calls the constructor of the superclass AMQSession_0_10, which does this:
_qpidConnection = qpidConnection; if (name == null) { _qpidSession = _qpidConnection.createSession(1); } else { _qpidSession = _qpidConnection.createSession(name,1); }
... this session is not XA.
2. Immediately after calling the super's constructor it calls createSession() which does this:
_qpidDtxSession = getQpidConnection().createSession(0,true); _qpidDtxSession.setSessionListener(this); _qpidDtxSession.dtxSelect();
this session is XA
3. Finally if you call getSession(), getQueueSession() or getTopicSession(), it creates a third (non-XA) session
public Session getSession() throws JMSException { if (_jmsSession == null) { _jmsSession = getAMQConnection().createSession(true, getAcknowledgeMode()); } return _jmsSession; }
Why do we need three separate sessions, with two of them being non-XA?