[ 
https://issues.apache.org/jira/browse/QPID-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Keith Wall updated QPID-4934:
-----------------------------

    Fix Version/s: 0.24

> [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
>             Fix For: 0.24
>
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to