Sun Java System Message Queue 4.1 Developer's Guide for JMX Clients

Operations

The transaction manager monitor MBean supports the operations shown in Table 3–69. The names of these operations are defined as static constants in the utility class TransactionOperations.

Table 3–69 Transaction Manager Monitor Operations

Name 

Parameters 

Result Type 

Description 

getTransactionIDs

None 

String[]

Transaction identifiers of all current open transactions

getTransactionInfoByID

transactionID (String)

CompositeData

Descriptive information about transaction 

The desired transaction is designated by its transaction identifier (transactionID). The value returned is a JMX CompositeData object describing the transaction; see Table 3–70 for lookup keys used with this object.

getTransactionInfo

None 

CompositeData[]

Descriptive information about all current open transactions 

The value returned is an array of JMX CompositeData objects describing the transactions; see Table 3–70 for lookup keys used with these objects.

The getTransactionInfoByID and getTransactionInfo operations return objects implementing the JMX interface CompositeData, which maps lookup keys to associated data values. The keys shown in Table 3–70 are defined as static constants in the utility class TransactionInfo for use with these objects.

Table 3–70 Lookup Keys for Transaction Information

Name 

Value Type 

Description 

TransactionID

String

Transaction identifier

XID [Distributed transactions only]

String

Distributed transaction identifier (XID)

User

String

User name 

ClientID

String

Client identifier 

ConnectionString

String

Connection string 

CreationTime

Long

Time created, in standard Java format (milliseconds since January 1, 1970, 00:00:00 UTC)

State

Integer

Current state 

See Table 3–71 for possible values.

StateLabel

String

String representation of current state 

Useful for displaying the state in human-readable form, such as in the Java Monitoring and Management Console (jconsole).

See Table 3–71 for possible values.

NumMsgs

Long

Number of messages 

NumAcks

Long

Number of acknowledgments 

Table 3–71 shows the possible values returned for the lookup keys State and StateLabel. These values are defined as static constants in the utility class TransactionState.

Table 3–71 Transaction State Values

Value 

Utility Constant 

String Representation 

Meaning 

0

TransactionState.CREATED

CREATED

Transaction created 

1

TransactionState.STARTED

STARTED

Transaction started 

2

TransactionState.FAILED

FAILED

Transaction has failed 

3

TransactionState.INCOMPLETE

INCOMPLETE

Transaction incomplete 

4

TransactionState.COMPLETE

COMPLETE

Transaction complete 

5

TransactionState.PREPARED

PREPARED

Transaction in prepared state [Distributed transactions only]

6

TransactionState.COMMITTED

COMMITTED

Transaction committed 

7

TransactionState.ROLLEDBACK

ROLLEDBACK

Transaction rolled back 

8

TransactionState.TIMED_OUT

TIMED_OUT

Transaction has timed out 

-1

TransactionState.UNKNOWN

UNKNOWN

Transaction state unknown