IBM Support

IT27950: MQ Resource Adapter fails to match a ManagedConnection after it was previously used in a transaction which was rolled back

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • An application which utilises the IBM MQ classes for JMS is
    deployed in the RedHat JBoss application server, using the MQ
    Resource Adapter (MQ-RA).  A transaction which the application
    was involved in was rolled back.  Subsequent uses of the
    Connection object associated with the previously rolled back
    transaction:
    
      javax.resource.spi.ManagedConnection
    
    are no longer matched by the MQ Resource Adapter within the
    method:
    
    javax.resource.spi.ManagedConnectionFactory.matchManagedConnecti
    ons(
      java.util.Set,
      javax.security.auth.Subject,
      javax.resource.spi.ConnectionRequestInfo)
    
    
    The consequence of this is that it cannot be reused by an
    application requesting a JMS Connection from a
    ConnectionFactory.  This results in JBoss removing it from its
    connection pool, destroying it and recreating a new one in its
    place.  An 'IJ000612' warning message is logged by JBoss when
    this occurs:
    
      WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.
             OnePool] IJ000612: Destroying connection that could
    not be successfully matched:
    org.jboss.jca.core.connectionmanager.listener.TxConnectionListen
    er
      ...
    com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManage
    dJMSConnectionConnectionFactoryImpl.java:307)
      ...
    com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnec
    tionInternalConnectionFactoryImpl.java:250)
      ...
    com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnec
    tionConnectionFactoryImpl.java:223)
      ...
    com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnec
    tion
    
    
    The net outcome of this issue is that there is a performance
    penalty associated with closing and then creating a new JMS
    Connection, rather than reusing an existing one from the pool.
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects applications that are deployed into
    application servers (excluding the IBM WebSphere Application
    Server), that use the IBM MQ Resource Adapter for "outbound"
    messaging and participate in XA transactions with Connection
    pooling.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When using the IBM MQ JCA Resource Adapter (MQ-RA) for outbound
    messaging, a JEE application server will invoke the method:
    
      matchManagedConnections(
          java.util.Set,
          javax.security.auth.Subject,
          javax.resource.spi.ConnectionRequestInfo )
    
    on the:
    
      javax.resource.spi.ManagedConnectionFactory
    
    object instance (as provided by the MQ Resource Adapter) for the
    resource adapter to attempt to match a ManagedConnection
    instance from within the Set, in order to service a JMS
    Connection creation request from an application.
    
    If the Set contained a ManagedConnection object that had
    previously been involved in a rolled back transaction then it
    would not be matched by the above method call.  A rolled back
    transaction might occur for example when the application
    server's transaction manager passed the "TMFAIL" flag on the
    "xa_end" call, followed by a "xa_rollback" call.
    
    This failure to match an existing Connection was because an
    internal flag set on the Connection object, to indicate whether
    the ManagedConnection was still involved in a transaction that
    had not been completed, was set to true.  The flag would only be
    reset to false to indicate it was now eligible to be reused upon
    a successful commit of the transaction.  It was not reset if the
    transaction was rolled back.
    

Problem conclusion

  • The IBM MQ Resource Adapter code has been updated to ensure the
    flag used to indicate whether a ManagedConnection is involved in
    an incomplete transaction is reset to false after a transaction
    is completed, regardless of whether it was committed or rolled
    back.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v8.0       8.0.0.13
    v9.0 LTS   9.0.0.8
    v9.1 CD    9.1.4
    v9.1 LTS   9.1.0.4
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT27950

  • Reported component name

    IBM MQ BASE MP

  • Reported component ID

    5724H7251

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-01-31

  • Closed date

    2019-08-01

  • Last modified date

    2019-08-01

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    IBM MQ BASE MP

  • Fixed component ID

    5724H7251

Applicable component levels

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.0.0","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
01 August 2019