IBM Support

IT42355: MQ classes for JMS applications become blocked while creating a JMS Session when using automatic client reconnection

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

  • A multi-threaded MQ classes for JMS application is configured to
    use a ConnectionFactory that contains information about how to
    connect to a queue manager using the CLIENT transport. The
    Connection Factory also has the following property set:
    
    CLIENTRECONNECTOPTIONS=QMGR
    
    which means that the MQ classes for JMS will use automatic
    client reconnection to try and reconnect to the queue manager if
    the application becomes disconnected for some reason.
    
    After the main thread within the application uses the Connection
    Factory to create a JMS Connection to the queue manager, other
    threads call the method:
    
    Connection.createSession(boolean, int)
    
    to create JMS Sessions which will be used to perform JMS
    operations with the queue manager.
    
    While one or more threads are calling this method, the queue
    manager fails over to another system. Intermittently, one or
    more threads that were creating a JMS Session at this time get
    stuck in the call to:
    
    Connection.createSession(boolean, int)
    
    and the number of channel instances (or TCP/IP connections)
    between the application and the queue manager start to grow.
    

Local fix

  • Set the  -Dcom.ibm.mq.cfg.TCP.Connect_Timeout value to less
    than 60 seconds.
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of:
    
    - The IBM MQ 9.2 classes for JMS.
    - The IBM MQ 9.3 classes for JMS.
    - The IBM MQ 9.3 classes for Jakarta Messaging.
    
    who have applications that use automatic client reconnection
    when connecting to a queue manager.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When using either the MQ classes for JMS or the MQ classes for
    Jakarta Messaging:
    
    - Every JMS Connection created by an application has its own
    conversation or connection handle (hconn) to the queue manager.
    This is known as the "Parent hconn".
    - Each JMS Session created by an application also has its own
    conversation or hconn to the queue manager. Because JMS Sessions
    are created from JMS Connections, the Session's hconns are
    "Child hconns" of the Connection's "Parent hconn".
    
    Here is a simple diagram that shows this relationship
    
    JMS Connection               [Parent Hconn]
       |----> JMS Session 1      [    |----> Child Hconn1]
       |----> JMS Session 2      [    |----> Chilld Hconn2]
    
    If an application is connecting to a queue manager using the
    CLIENT transport, then the "Parent Hconn" and the "Child Hconns"
    will be assigned to a channel instance. The maximum number of
    hconns that can use a single channel instance is determined by
    the channel attribute SHARECNV (Shared Connections).
    
    
    Now, an MQ classes for JMS or MQ classes for Jakarta Messaging
    application will be able to use some functionality called
    "automatic client reconnection" if it is:
    
    - Either using a ConnectionFactory that has the
    CLIENTRECONNECTOPTIONS property set to either QMGR or ANY.
    - Or using a ConnectionFactory that has the
    CLIENTRECONNECTOPTIONS property set to ASDEF, and the MQ channel
    specified in the ConnectionFactory definition has the
    DefReconnect attribute set to QMGR or YES.
    
    When automatic client reconnection is being used, if the
    application become disconnected from the queue manager, the MQ
    classes for JMS or MQ classes for Jakarta Messaging will
    initially try to reconnect the Parent hconn associated with the
    JMS Connection. Once that hconn has been reconnected, the MQ
    classes for JMS will reconnect the Child hconns associated with
    the JMS Sessions created from the JMS Connection.
    
    If an application that was using this functionality:
    
    - Become disconnected from the queue manager while it was
    calling the method Connection.createSession(boolean,int)
    - And the attempt to reconnect the Parent hconn associated with
    the JMS Connection failed with a permanent error.
    
    then the MQ classes for JMS and MQ classes for Jakarta messaging
    would get stuck within the Connection.createSession(boolean,int)
    call, continually creating new hconns to the queue manager. This
    would result in the number of channel instances between the
    application and the queue manager growing over time.
    

Problem conclusion

  • To resolve this issue, the MQ classes for JMS and MQ classes for
    Jakarta Messaging have been updated so that:
    
    - If an application becomes disconnected from a queue manager
    while calling the Connection.createSession(boolean,int) method.
    - And an attempt to automatically reconnect the the application
    fails with a permanent error.
    
    then the Connection.createSession(boolean,int) method will exit
    with a JMSException containing a linked exception which includes
    MQ reason code 2548 (MQRC_RECONNECT_FAILED).
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.2 LTS   9.2.0.10
    v9.3 LTS   9.3.0.5
    v9.x CD    9.3.2
    
    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

    IT42355

  • Reported component name

    MQ BASE V9.2

  • Reported component ID

    5724H7281

  • Reported release

    920

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2022-10-27

  • Closed date

    2022-11-28

  • Last modified date

    2022-11-29

  • 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

    MQ BASE V9.2

  • Fixed component ID

    5724H7281

Applicable component levels

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"920","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 November 2022