org.jboss.tm
Class TransactionManagerService

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.tm.TransactionManagerService
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , javax.naming.spi.ObjectFactory, Service (src) , ServiceMBean (src)

public class TransactionManagerService
extends ServiceMBeanSupport (src)
implements javax.naming.spi.ObjectFactory

This is a JMX service which manages the TransactionManager. The service creates it and binds a Reference to it into JNDI.

See Also:
TxManager (src)

Field Summary
static java.lang.String JNDI_EXPORTER
           
static java.lang.String JNDI_IMPORTER
           
static java.lang.String JNDI_NAME
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
TransactionManagerService()
           
 
Method Summary
 long getCommitCount()
          The number of commits.
 boolean getGlobalIdsEnabled()
          Describe getGlobalIdsEnabled method here.
 java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)
           
 long getRollbackCount()
          The number of rollbacks.
 long getTransactionCount()
          Counts the number of transactions
 TransactionManager (src) getTransactionManager()
          mbean get-set pair for field transactionManager Get the value of transactionManager
 int getTransactionTimeout()
          Describe getTransactionTimeout method here.
 JBossXATerminator (src) getXATerminator()
          Get the xa terminator
 ObjectName (src) getXidFactory()
          mbean get-set pair for field xidFactory Get the value of xidFactory
 boolean isInterruptThreads()
          Is thread interruption enabled at transaction timeout
 void registerXAExceptionFormatter(java.lang.Class clazz, XAExceptionFormatter (src)  formatter)
          The registerXAExceptionFormatter method
 void setGlobalIdsEnabled(boolean newValue)
          Describe setGlobalIdsEnabled method here.
 void setInterruptThreads(boolean interruptThreads)
          Enable/disable thread interruption at transaction timeout.
 void setTransactionTimeout(int timeout)
          Describe setTransactionTimeout method here.
 void setXidFactory(ObjectName (src)  xidFactory)
          Set the value of xidFactory
protected  void startService()
          Sub-classes should override this method to provide custum 'start' logic.
protected  void stopService()
          Sub-classes should override this method to provide custum 'stop' logic.
 void unregisterXAExceptionFormatter(java.lang.Class clazz)
          The unregisterXAExceptionFormatter method
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JNDI_NAME

public static java.lang.String JNDI_NAME

JNDI_IMPORTER

public static java.lang.String JNDI_IMPORTER

JNDI_EXPORTER

public static java.lang.String JNDI_EXPORTER
Constructor Detail

TransactionManagerService

public TransactionManagerService()
Method Detail

startService

protected void startService()
                     throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

stopService

protected void stopService()
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'stop' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
stopService in class ServiceMBeanSupport (src)

getGlobalIdsEnabled

public boolean getGlobalIdsEnabled()
Describe getGlobalIdsEnabled method here.

Returns:
an boolean value

setGlobalIdsEnabled

public void setGlobalIdsEnabled(boolean newValue)
Describe setGlobalIdsEnabled method here.

Parameters:
newValue - an boolean value

isInterruptThreads

public boolean isInterruptThreads()
Is thread interruption enabled at transaction timeout

Returns:
true for interrupt threads, false otherwise

setInterruptThreads

public void setInterruptThreads(boolean interruptThreads)
Enable/disable thread interruption at transaction timeout.

Parameters:
interruptThreads - pass true to interrupt threads, false otherwise

getTransactionTimeout

public int getTransactionTimeout()
Describe getTransactionTimeout method here.

Returns:
an int value

setTransactionTimeout

public void setTransactionTimeout(int timeout)
Describe setTransactionTimeout method here.

Parameters:
timeout - an int value

getXidFactory

public ObjectName (src)  getXidFactory()
mbean get-set pair for field xidFactory Get the value of xidFactory

Returns:
value of xidFactory

setXidFactory

public void setXidFactory(ObjectName (src)  xidFactory)
Set the value of xidFactory

Parameters:
xidFactory - Value to assign to xidFactory

getTransactionManager

public TransactionManager (src)  getTransactionManager()
mbean get-set pair for field transactionManager Get the value of transactionManager

Returns:
value of transactionManager

getXATerminator

public JBossXATerminator (src)  getXATerminator()
Get the xa terminator

Returns:
the xa terminator

getTransactionCount

public long getTransactionCount()
Counts the number of transactions

Returns:
the number of active transactions

getCommitCount

public long getCommitCount()
The number of commits.

Returns:
the number of transactions that have been committed

getRollbackCount

public long getRollbackCount()
The number of rollbacks.

Returns:
the number of transactions that have been rolled back

registerXAExceptionFormatter

public void registerXAExceptionFormatter(java.lang.Class clazz,
                                         XAExceptionFormatter (src)  formatter)
The registerXAExceptionFormatter method

Parameters:
clazz - a Class value
formatter - a XAExceptionFormatter value

unregisterXAExceptionFormatter

public void unregisterXAExceptionFormatter(java.lang.Class clazz)
The unregisterXAExceptionFormatter method

Parameters:
clazz - a Class value

getObjectInstance

public java.lang.Object getObjectInstance(java.lang.Object obj,
                                          javax.naming.Name name,
                                          javax.naming.Context nameCtx,
                                          java.util.Hashtable environment)
                                   throws java.lang.Exception
Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Throws:
java.lang.Exception