org.ow2.jonas.tm.jotm.mbean
Class JTAResource

java.lang.Object
  extended by org.ow2.jonas.lib.management.javaee.ManagedObject
      extended by org.ow2.jonas.lib.management.javaee.J2EEManagedObject
          extended by org.ow2.jonas.lib.management.javaee.J2EEResource
              extended by org.ow2.jonas.tm.jotm.mbean.JTAResource

public class JTAResource
extends J2EEResource

MBean class for JTAResource Management

Author:
Eric Hardesty JSR 77 (J2EE Management Standard)

Field Summary
static String SERVICE_NAME
          Service name as used to label configuration properties
 
Fields inherited from class org.ow2.jonas.lib.management.javaee.J2EEManagedObject
J2EE_TYPE_APPLICATION, J2EE_TYPE_SERVER, NAME
 
Fields inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject
logger
 
Constructor Summary
JTAResource(String objectName, JOTMTransactionService jtm, Integer timeOut, Boolean localJtm, Integer portNumber, String hostName)
          JTA Resource constructor
 
Method Summary
 int commitXAResource(String xatx)
          administrator recovery action: Commit.
 int forgetXAResource(String xatx)
          administrator recovery action: forget
 String[] getAllActiveTx()
           
 Xid[] getAllActiveXids()
           
 String[] getAllRecoveryTx()
           
 String[] getAllXAResource(String xatx)
           
 String getHostName()
           
 Integer getPortNumber()
           
 Integer getTimeOut()
           
 Integer getTotalBegunTransactions()
           
 Integer getTotalCommittedTransactions()
           
 Integer getTotalCurrentTransactions()
           
 Integer getTotalExpiredTransactions()
           
 Integer getTotalRolledbackTransactions()
           
 Boolean isLocalJtm()
           
 void resetAllCounters()
          Reset all transaction counters
 int rollbackXAResource(String xatx)
          administrator recovery action: rollback
 void saveConfig()
          Save updated configuration
 void setTimeOut(Integer timeOut)
           
 
Methods inherited from class org.ow2.jonas.lib.management.javaee.J2EEResource
isJ2eeResourceType
 
Methods inherited from class org.ow2.jonas.lib.management.javaee.J2EEManagedObject
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider, setEventProvider, setObjectName, setStateManageable, setStatisticsProvider
 
Methods inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject
sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

public static final String SERVICE_NAME
Service name as used to label configuration properties

See Also:
Constant Field Values
Constructor Detail

JTAResource

public JTAResource(String objectName,
                   JOTMTransactionService jtm,
                   Integer timeOut,
                   Boolean localJtm,
                   Integer portNumber,
                   String hostName)
JTA Resource constructor

Parameters:
objectName - String conformant to a JTAResource OBJECT_NAME in JSR77
jtm - Managed JTM
timeOut - transactions time-out
localJtm - true if JTM is local, false if remote
portNumber - JTM port number
hostName - JTM host name
Method Detail

getTimeOut

public Integer getTimeOut()
Returns:
Returns the timeOut.

setTimeOut

public void setTimeOut(Integer timeOut)
Parameters:
timeOut - The timeOut to set.

isLocalJtm

public Boolean isLocalJtm()
Returns:
true if JTM is local, false if remote

getPortNumber

public Integer getPortNumber()
Returns:
JTM port number

getHostName

public String getHostName()
Returns:
JTM host name

saveConfig

public void saveConfig()
Save updated configuration


getTotalBegunTransactions

public Integer getTotalBegunTransactions()
Returns:
Returns the totalBegunTransactions.

getTotalCommittedTransactions

public Integer getTotalCommittedTransactions()
Returns:
Returns the totalCommittedTransactions.

getTotalCurrentTransactions

public Integer getTotalCurrentTransactions()
Returns:
Returns the totalCurrentTransactions.

getTotalExpiredTransactions

public Integer getTotalExpiredTransactions()
Returns:
Returns the totalExpiredTransactions.

getTotalRolledbackTransactions

public Integer getTotalRolledbackTransactions()
Returns:
Returns the totalRolledbackTransactions.

resetAllCounters

public void resetAllCounters()
Reset all transaction counters


getAllActiveXids

public Xid[] getAllActiveXids()
Returns:
Returns all active Xids.

getAllActiveTx

public String[] getAllActiveTx()
Returns:
Returns all active Transactions.

getAllRecoveryTx

public String[] getAllRecoveryTx()
Returns:
Returns all Transactions that require administrator recovery action.

getAllXAResource

public String[] getAllXAResource(String xatx)
Returns:
Returns all XAResources that require administrator recovery action.

commitXAResource

public int commitXAResource(String xatx)
administrator recovery action: Commit.

Returns:
int error, or 0 if OK.

rollbackXAResource

public int rollbackXAResource(String xatx)
administrator recovery action: rollback

Returns:
int error, or 0 if OK.

forgetXAResource

public int forgetXAResource(String xatx)
administrator recovery action: forget

Returns:
int error, or 0 if OK.


Copyright © 2010 OW2 Consortium. All Rights Reserved.