Resolving indoubt transactions

Use this task to resolve indoubt transactions and the messages associated with them.

Transactions might become stuck in the indoubt state indefinitely because of an exceptional circumstance such as the removal of a node causing messaging engines to be destroyed. When a transaction becomes indoubt, it must be committed or rolled back so that normal processing by the affected messaging engine can continue. Use the administrative console to display the messages causing the problem (see Listing messages on a message point). If there are messages involved in an indoubt transaction, the identity of the transaction is shown in a panel associated with the message. We can then resolve the transaction in two ways:

  1. Use the server transaction management panels

  2. Use methods on the messaging engine MBean

You must first attempt to resolve the indoubt transaction by using the application server transaction management MBean interfaces. These are documented in Manage active and prepared transactions by using wsadmin scripting. Use the scripts for all appservers that might have been coordinating transactions, including Messaging actions, for the default messaging provider. If the transaction identity is known by the transaction manager scripts, use those scripts to resolve the transactions. This will consistently resolve all resources (including Messaging) within a global transaction.

If the transaction identity is not known to the transaction manager scripts that run on any application server, or if the appserver hosting the transaction manager cannot be recovered, it is possible to use methods on the SIBMessagingEngine MBean to resolve the Messaging part of a transaction independently from the global transaction. The choice to commit or rollback the transaction must be made manually. The following methods on the messaging engine MBean can be used to get a list of transaction identities (xid) and to commit and roll back transactions:

To invoke the methods, we can use a wsadmin command, for example, we can use a command of the following form to obtain a list of the indoubt transaction identities from a messaging engine MBean:

splitlines()[0] , "getPreparedTransactions")
Alternatively, we can use a script such as the following to invoke the methods on the MBean:
import sys


for mebean in mebeans:
  print "--- Start ME: ---------------"
  print mebean
  print "-----------------------------"
  while input>=0:
    xidList=AdminControl.invoke(mebean , "getPreparedTransactions").splitlines()
    print "--- Prepared Transactions ---"
    for xid in xidList:
      print "  Index=%s XID=%s" % (index , xid)
    print "------- End of list ---------"
    print "Select index of XID to commit/rollback"
    print "(or press enter to skip to next ME):"

    if input<0:
      print "No index selected."
      print "Enter c to commit or r to rollback XID %s" % xid
      if input=="c":
        print "Committing xid=%s" % xid
        AdminControl.invoke(mebean , "commitPreparedTransaction" , xid)
      if input=="r":
        print "Rolling back xid=%s" % xid
        AdminControl.invoke(mebean , "rollbackPreparedTransaction" , xid)
  print "--- End ME --------------------"

print "No more ME definitions found, exiting"

This script lists the transaction identities of the transactions together with an index. We can then select an index and commit or roll back the transaction corresponding to that index.


  1. Use the admin console to find the transaction identity of messages that have indoubt transactions.


    If a transaction identity appears in the transaction management panel, commit or roll back the transactions as required.


    If a transaction identity does not appear in the transaction management panel, use the methods on the messaging engine MBean. For example, use a script to display a list of transaction identities for indoubt transactions. For each transaction:

    1. Enter the index of the transaction identity of the transaction.


      Enter c to commit the transaction.


      Enter r to roll back the transaction.

  4. To check that transactions are no longer indoubt, restart the server and use the transaction management panel, or methods on the messaging engine MBean to check.

Last updated Nov 10, 2010 8:23:07 PM CST