IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.management
Interface TransactionMBean


public interface TransactionMBean

This MBean interface allows a client process to retrieve and heuristically resolve all indoubt transactions from a partition running in a dynamic environment.

An indoubt transaction is a WebSphere eXtreme Scale multi-partition transaction where one or more of the partitions participating in the transaction have completed the first phase of the two-phase commit protocol but are waiting to begin the second phase of the protocol. During this indoubt period locks are held on all data written to the BackingMaps until the decision to commit or rollback the transaction is determined.

The object name pattern for this MBean is:

 com.ibm.websphere.objectgrid:type=Transaction,objectGridName=<objectgrid>,mapSetName=<mapset>,partition=<partition id>,host=<host>,ogServerName=<server>
 

Since:
8.6

Field Summary
static String COLUMN_RESYNCATTEMPTS
          ResyncAttempts column name defined in the CompositeData returned by the getIndoubtList method
static String COLUMN_ROLE
          Role column name defined in the CompositeData returned by the getIndoubtList method
static String COLUMN_STATE
          State column name defined in the CompositeData returned by the getIndoubtList method
static String COLUMN_TIMESTAMP
          Timestamp column name defined in the CompositeData returned by the getIndoubtList method
static String COLUMN_XID
          Xid column name defined in the CompositeData returned by the getIndoubtList method
static String COMMIT
          Indicates that the outcome of this transaction is to commit.
static String HEUR_COMMIT
          Indicates that this transaction was heuristically committed at this partition.
static String HEUR_ROLLBACK
          Indicates that this transaction was heuristically rolled back at this partition.
static String PREPARED
          Indicates that the transaction at this partition has successful completed the first phase of the two-phase commit protocol and is waiting to begin the second phase of the protocol.
static String RM
          Indicates that this partition is a participant or Resource manager (RM) in this transaction.
static String ROLLBACK
          Indicates that the outcome of this transaction is rollback.
static String TM
          Indicates that this partition has been assigned as the Transaction Manager (TM) for this transaction.
 
Method Summary
 void commit(String xid)
          Heuristically commit the specified transaction at this partition.
 void forget(String xid)
          Heuristically forget the specified transaction at this partition.
 TabularData getIndoubtList(String filterSpec)
          Retrieve a list of all transactions that are in the indoubt state at this partition.
 String getType()
          Retrieve the type of the shard this TransactionMBean is instantiate on.
 void rollback(String xid)
          Heuristically rollback the specified transaction at this partition.
 

Field Detail

TM

static final String TM
Indicates that this partition has been assigned as the Transaction Manager (TM) for this transaction. The responsibility of the TM partition is to record the decision of the transaction and to ensure transactional consistency across all partitions involved in the transaction when a failure occurs during the second phase of the two-phase commit protocol

See Also:
Constant Field Values

RM

static final String RM
Indicates that this partition is a participant or Resource manager (RM) in this transaction.

See Also:
Constant Field Values

PREPARED

static final String PREPARED
Indicates that the transaction at this partition has successful completed the first phase of the two-phase commit protocol and is waiting to begin the second phase of the protocol.

See Also:
Constant Field Values

COMMIT

static final String COMMIT
Indicates that the outcome of this transaction is to commit. The TM partition is waiting for all the partitions involved in the transaction to commit.

See Also:
Constant Field Values

ROLLBACK

static final String ROLLBACK
Indicates that the outcome of this transaction is rollback. The TM partition is waiting for all the partitions involved in the transaction to rollback.

See Also:
Constant Field Values

HEUR_COMMIT

static final String HEUR_COMMIT
Indicates that this transaction was heuristically committed at this partition.

See Also:
Constant Field Values

HEUR_ROLLBACK

static final String HEUR_ROLLBACK
Indicates that this transaction was heuristically rolled back at this partition.

See Also:
Constant Field Values

COLUMN_TIMESTAMP

static final String COLUMN_TIMESTAMP
Timestamp column name defined in the CompositeData returned by the getIndoubtList method

See Also:
Constant Field Values

COLUMN_XID

static final String COLUMN_XID
Xid column name defined in the CompositeData returned by the getIndoubtList method

See Also:
Constant Field Values

COLUMN_STATE

static final String COLUMN_STATE
State column name defined in the CompositeData returned by the getIndoubtList method

See Also:
Constant Field Values

COLUMN_ROLE

static final String COLUMN_ROLE
Role column name defined in the CompositeData returned by the getIndoubtList method

See Also:
Constant Field Values

COLUMN_RESYNCATTEMPTS

static final String COLUMN_RESYNCATTEMPTS
ResyncAttempts column name defined in the CompositeData returned by the getIndoubtList method

See Also:
Constant Field Values
Method Detail

getType

String getType()
Retrieve the type of the shard this TransactionMBean is instantiate on.

Returns:
The shard type.

getIndoubtList

TabularData getIndoubtList(String filterSpec)
                           throws OpenDataException
Retrieve a list of all transactions that are in the indoubt state at this partition. If the filter specification argument is specified, then only indoubt transactions that meet the filter criteria are returned.

The filter specification should be in the form: filterName=value(:<filterName=value>)*

filterNameDescription
age Retrieve indoubt transactions that have been in the system for more than the specified value. Value specified in minutes
xid Retrieve only the specified indoubt transaction. Value represents the transaction identifier

This method returns a TabularData object representing the details of each indoubt transaction at this partition.

Each CompositeData (row in the TabularData) contains the following items:

Item NameTypeDescription
Timestamp String Specifies the time the transaction entered the indoubt state at this partition.
State String The state of the transaction at this partition.
Role String The role the transaction is using this partition for. Valid roles include: TM or RM.
ResyncAttempts Integer If the partition is acting as the RM then this value indicates the the number of times this partition has attempted to re-synchronize with the TM partition for this transaction. Otherwise it indicates the number of times this partition has attempted to re-synchronize with the RM partitions involved in this transaction.
Xid String The X/Open Transaction Identifier

Parameters:
filterSpec - - The filter specification
Returns:
TabularData representing all partitions involved in the transaction
Throws:
OpenDataException
Since:
8.6

commit

void commit(String xid)
            throws MBeanException
Heuristically commit the specified transaction at this partition. The operation is only valid if the state of the transaction is PREPARED

Please use extreme caution before invoking this function. The best strategy is to wait for eXtreme scale to automatically resolve this transaction. You could experience data integrity problems if you manually commit or roll back a transaction in one of the partition, and the opposite action is taken against another partition.

Parameters:
xid - The transaction identifier
Throws:
MBeanException

rollback

void rollback(String xid)
              throws MBeanException
Heuristically rollback the specified transaction at this partition. The operation is only valid if the state of the transaction is PREPARED

Please use extreme caution before invoking this function. The best strategy is to wait for eXtreme scale to automatically resolve this transaction. You could experience data integrity problems if you manually commit or roll back a transaction in one of the partition, and the opposite action is taken against another partition.

Parameters:
xid - The transaction identifier
Throws:
MBeanException

forget

void forget(String xid)
            throws MBeanException
Heuristically forget the specified transaction at this partition. The operation is only valid if the state of the transaction is HEUR_COMMIT or HEUR_ROLLBACK

Please use extreme caution before invoking this function. The best strategy is to wait for eXtreme scale to automatically resolve this transaction. You could experience data integrity problems if you manually commit or roll back a transaction in one of the partition, and the opposite action is taken against another partition.

Parameters:
xid - The transaction identifier
Throws:
MBeanException

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.