You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/06/18 19:24:20 UTC

[jira] [Commented] (QPID-4934) [Java Client] XASessionImpl creates three AMQP sessions, only one is XA... why?

    [ https://issues.apache.org/jira/browse/QPID-4934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13686982#comment-13686982 ] 

ASF subversion and git services commented on QPID-4934:
-------------------------------------------------------

Commit 1494214 from [~godfrer]
[ https://svn.apache.org/r1494214 ]

QPID-4934 : [Java XA] Stop redundant session creation for XA Sessions, improve logging for XA
                
> [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: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org