Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-4934

[Java Client] XASessionImpl creates three AMQP sessions, only one is XA... why?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.24
    • JMS AMQP 0-x
    • 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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            rgodfrey Robert Godfrey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: