Rob Godfrey created QPID-4934:
---------------------------------

             Summary: [Java Client] XASessionImpl creates three AMQP sessions, 
only one is XA... why?
                 Key: QPID-4934
                 URL: https://issues.apache.org/jira/browse/QPID-4934
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
            Reporter: Rob Godfrey


XASessionImpl creates three AMQP Sessions...

1) it calls the constructor of the superclass AMQSession_0_10, which does this:

{code}
    _qpidConnection = qpidConnection;
    if (name == null)
    {
        _qpidSession = _qpidConnection.createSession(1);
    }
    else
    {
        _qpidSession = _qpidConnection.createSession(name,1);
    }
{code}

... this session is not XA.

2. Immediately after calling the super's constructor it calls createSession() 
which does this:

{code}
    _qpidDtxSession = getQpidConnection().createSession(0,true);
    _qpidDtxSession.setSessionListener(this);
    _qpidDtxSession.dtxSelect();
{code}

this session is XA

3. Finally if you call getSession(), getQueueSession() or getTopicSession(), it 
creates a third (non-XA) session

{code}
    public Session getSession() throws JMSException
    {
        if (_jmsSession == null)
        {
            _jmsSession = getAMQConnection().createSession(true, 
getAcknowledgeMode());
        }
        return _jmsSession;
    }
{code}


Why do we need three separate sessions, with two of them being non-XA?


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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]

Reply via email to