com.atomikos.icatch.admin.jmx
Class JmxTransaction

java.lang.Object
  extended by com.atomikos.icatch.admin.jmx.JmxTransaction
All Implemented Interfaces:
JmxTransactionMBean, MBeanRegistration
Direct Known Subclasses:
JmxDefaultTransaction, JmxHeuristicTransaction, JmxPreparedTransaction

public abstract class JmxTransaction
extends Object
implements JmxTransactionMBean, MBeanRegistration

The base class for MBean administration of transactions.


Constructor Summary
JmxTransaction(AdminTransaction adminTransaction)
          Wraps an existing AdminTransaction instance as an MBean.
 
Method Summary
protected static String[] convertHeuristicMessages(HeuristicMessage[] msgs)
           
protected static String convertState(int state)
          Convert the given int state.
protected  AdminTransaction getAdminTransaction()
           
 String[] getHeuristicMessages()
          Get the HeuristicMessage detailed info for this transaction.
 String getState()
          Get the transaction's state.
 String[] getTags()
          Get the high-level heuristic comments.
 String getTid()
          Get the transaction identifier.
 void postDeregister()
           
 void postRegister(Boolean arg0)
           
 void preDeregister()
           
 ObjectName preRegister(MBeanServer server, ObjectName name)
           
protected  void unregister()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmxTransaction

public JmxTransaction(AdminTransaction adminTransaction)
Wraps an existing AdminTransaction instance as an MBean.

Parameters:
adminTransaction - The existing to wrap.
Method Detail

convertState

protected static String convertState(int state)
Convert the given int state.

Parameters:
state - The given int state.
Returns:
String The string state, or null if not found.

convertHeuristicMessages

protected static String[] convertHeuristicMessages(HeuristicMessage[] msgs)

getAdminTransaction

protected AdminTransaction getAdminTransaction()

unregister

protected void unregister()

getTid

public String getTid()
Description copied from interface: JmxTransactionMBean
Get the transaction identifier.

Specified by:
getTid in interface JmxTransactionMBean
Returns:
String The unique id.
See Also:
com.atomikos.icatch.admin.jmx.TransactionMBean#getTid()

getState

public String getState()
Description copied from interface: JmxTransactionMBean
Get the transaction's state.

Specified by:
getState in interface JmxTransactionMBean
Returns:
String The state, represented as by its name
See Also:
com.atomikos.icatch.admin.jmx.TransactionMBean#getState()

getTags

public String[] getTags()
Description copied from interface: JmxTransactionMBean
Get the high-level heuristic comments. This is what remote clients will see as well.

Specified by:
getTags in interface JmxTransactionMBean
Returns:
HeuristicMessage The comments giving a summary of the tasks done in this transaction.
See Also:
com.atomikos.icatch.admin.jmx.TransactionMBean#getTags()

getHeuristicMessages

public String[] getHeuristicMessages()
Description copied from interface: JmxTransactionMBean
Get the HeuristicMessage detailed info for this transaction.

Specified by:
getHeuristicMessages in interface JmxTransactionMBean
Returns:
HeuristicMessage[] The detailed heuristic messages. These show the comments for EACH individual resource that was part of the transaction.
See Also:
com.atomikos.icatch.admin.jmx.TransactionMBean#getHeuristicMessages()

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws Exception
Specified by:
preRegister in interface MBeanRegistration
Throws:
Exception
See Also:
MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName)

postRegister

public void postRegister(Boolean arg0)
Specified by:
postRegister in interface MBeanRegistration
See Also:
MBeanRegistration.postRegister(java.lang.Boolean)

preDeregister

public void preDeregister()
                   throws Exception
Specified by:
preDeregister in interface MBeanRegistration
Throws:
Exception
See Also:
MBeanRegistration.preDeregister()

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface MBeanRegistration
See Also:
MBeanRegistration.postDeregister()


Copyright © 2011. All Rights Reserved.