IBM Support

IT37878: WebSphere Application Server activation specifications do not pause when an MDB calls setRollbackOnly()

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 IBM MQ messaging provider activation specification has been
    defined within WebSphere Application Server 9.0.5.3 (or later).
    The activation specification has been configured with:
    
    - The "Stop endpoint if message delivery fails" checkbox
    selected
    - The "Number of sequential delivery failures before suspending
    endpoint" property set to value 0.
    
    so that it will pause the first time that a message is rolled
    back.
    
    A message-driven bean (MDB) application is deployed into the
    application server, and configured to use this activation
    specification. The MDB contains logic to determine if a
    transaction has failed and needs to be rolled back - in this
    situation, the MDB calls the method:
    
      javax.ejb.EJBContext.setRollbackOnly()
    
    When the MDB detects that a transaction has failed, the
    transaction is successfully rolled back and the message that the
    MDB was processing at the time is made available for consumption
    on the queue.
    
    However, the activation specification does not pause. As a
    result,  it detects the same message again and redelivers it to
    the MDB for processing.
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects all users of the WebSphere Application Server
    9.0.5.3 (and later) MQ messaging provider who:
    
    - Have activation specifications defined with the "Stop endpoint
    if message delivery fails" checkbox selected, and the "Number of
    sequential delivery failures before suspending endpoint"
    property set.
    - And have deployed a message-driven bean (MDB) application into
    the application server which is configured to use the activation
    specification, and contains logic to call the method
    EJBContext.setRollbackOnly() to roll back transactions that have
    failed.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    APAR IT27950 was raised to address an issue which prevented
    managed connections associated with transactions that had been
    rolled back from being reused within JBoss Application Server.
    
    As part of these changes, the way in which the MQ resource
    adapter handled transactions which had been rolled back was
    modified so that the XA resource associated with those
    transactions was moved straight into an internal NON_EXISTENT
    state rather than a ROLLBACK_ONLY state. Although this allowed
    any managed connections associated with the XA resource and
    transaction to be reused within JBoss Application Server, it
    meant that the MQ resource adapter no longer notified WebSphere
    Application Server that a delivery failure had occurred if an
    message-driven bean application had called
    EJBContext.setRollbackOnly().
    
    As a result, the application server did not increment its
    internal delivery failure counter, and so would never pause an
    activation specification when the specified number of
    consecutive delivery failures (as defined by the activation
    specification property "Number of sequential delivery failures
    before suspending endpoint") had occurred.
    
    The code change associated with APAR IT27950 was first shipped
    in the MQ 9.1 LTS release at MQ version 9.1.0.4.  This was first
    included within the WebSphere Application Server installation at
    version 9.0.5.3.  Subsequently this is the first version of the
    WebSphere Application Server which is affected by this issue.
    

Problem conclusion

  • To resolve this issue, the MQ 9.1 resource adapter has been
    updated so that if a transaction is rolled back, then the XA
    resource associated with a transaction will first be moved into
    an internal ROLLBACK_ONLY state, followed by an internal
    NON_EXISTENT state. This ensure that the MQ resource adapter:
    
    - Initially notifies WebSphere Application Server that a
    delivery failure has occurred, which allows the application
    server to increment its delivery failure counter and pause the
    activation specification if required,
    - And the clears some internal state within the managed
    connection associated with the XA resource and transaction,
    which allows the managed connection to be reused.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.1 LTS   9.1.0.11
    v9.2 LTS   9.2.0.5
    v9.x CD    9.2.5
    
    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

    IT37878

  • Reported component name

    IBM MQ BASE MP

  • Reported component ID

    5724H7271

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-08-04

  • Closed date

    2021-11-26

  • Last modified date

    2021-11-26

  • 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

    5724H7271

Applicable component levels

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

Document Information

Modified date:
27 November 2021