org.jboss.tm
Class TransactionManagerService

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.tm.TransactionManagerService
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, ObjectFactory, org.jboss.system.Service, org.jboss.system.ServiceMBean, TransactionManagerFactory, TransactionManagerServiceMBean

public class TransactionManagerService
extends org.jboss.system.ServiceMBeanSupport
implements TransactionManagerServiceMBean, ObjectFactory

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

Version:
$Revision: 1.21.6.3 $
Author:
Rickard Öberg, Ole Husgaard, Toby Allsopp, Francisco Reverbel
See Also:
TxManager

Field Summary
static String JNDI_EXPORTER
           
static String JNDI_IMPORTER
           
static String JNDI_NAME
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.tm.TransactionManagerServiceMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.system.ServiceMBean
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.
 Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment)
           
 long getRollbackCount()
          The number of rollbacks.
 long getTransactionCount()
          Counts the number of transactions
 TransactionManager getTransactionManager()
          mbean get-set pair for field transactionManager Get the value of transactionManager
 int getTransactionTimeout()
          Describe getTransactionTimeout method here.
 JBossXATerminator getXATerminator()
          Get the xa terminator
 javax.management.ObjectName getXidFactory()
          mbean get-set pair for field xidFactory Get the value of xidFactory
 boolean isInterruptThreads()
          Is thread interruption enabled at transaction timeout
 void registerXAExceptionFormatter(Class clazz, XAExceptionFormatter formatter)
          The registerXAExceptionFormatter method
 void setGlobalIdsEnabled(boolean newValue)
          Describe setGlobalIdsEnabled method here.
 void setInterruptThreads(boolean interruptThreads)
          Enable/disable thread interruption at transaction timeout.
 void setTransactionIntegrityFactory(TransactionIntegrityFactory factory)
          Set the Transaction integrity factory
 void setTransactionTimeout(int timeout)
          Describe setTransactionTimeout method here.
 void setXidFactory(javax.management.ObjectName xidFactory)
          Set the value of xidFactory
protected  void startService()
           
protected  void stopService()
           
 void unregisterXAExceptionFormatter(Class clazz)
          The unregisterXAExceptionFormatter method
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, 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
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

JNDI_NAME

public static String JNDI_NAME

JNDI_IMPORTER

public static String JNDI_IMPORTER

JNDI_EXPORTER

public static String JNDI_EXPORTER
Constructor Detail

TransactionManagerService

public TransactionManagerService()
Method Detail

startService

protected void startService()
                     throws Exception
Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

stopService

protected void stopService()
Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport

getGlobalIdsEnabled

public boolean getGlobalIdsEnabled()
Describe getGlobalIdsEnabled method here.

Specified by:
getGlobalIdsEnabled in interface TransactionManagerServiceMBean
Returns:
an boolean value

setGlobalIdsEnabled

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

Specified by:
setGlobalIdsEnabled in interface TransactionManagerServiceMBean
Parameters:
newValue - an boolean value

isInterruptThreads

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

Specified by:
isInterruptThreads in interface TransactionManagerServiceMBean
Returns:
true for interrupt threads, false otherwise

setInterruptThreads

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

Specified by:
setInterruptThreads in interface TransactionManagerServiceMBean
Parameters:
interruptThreads - pass true to interrupt threads, false otherwise

getTransactionTimeout

public int getTransactionTimeout()
Describe getTransactionTimeout method here.

Specified by:
getTransactionTimeout in interface TransactionManagerServiceMBean
Returns:
an int value

setTransactionTimeout

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

Specified by:
setTransactionTimeout in interface TransactionManagerServiceMBean
Parameters:
timeout - an int value

setTransactionIntegrityFactory

public void setTransactionIntegrityFactory(TransactionIntegrityFactory factory)
Set the Transaction integrity factory

Specified by:
setTransactionIntegrityFactory in interface TransactionManagerServiceMBean
Parameters:
factory - the factory

getXidFactory

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

Specified by:
getXidFactory in interface TransactionManagerServiceMBean
Returns:
value of xidFactory

setXidFactory

public void setXidFactory(javax.management.ObjectName xidFactory)
Set the value of xidFactory

Specified by:
setXidFactory in interface TransactionManagerServiceMBean
Parameters:
xidFactory - Value to assign to xidFactory

getTransactionManager

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

Specified by:
getTransactionManager in interface TransactionManagerFactory
Returns:
value of transactionManager

getXATerminator

public JBossXATerminator getXATerminator()
Get the xa terminator

Specified by:
getXATerminator in interface TransactionManagerServiceMBean
Returns:
the xa terminator

getTransactionCount

public long getTransactionCount()
Counts the number of transactions

Specified by:
getTransactionCount in interface TransactionManagerServiceMBean
Returns:
the number of active transactions

getCommitCount

public long getCommitCount()
The number of commits.

Specified by:
getCommitCount in interface TransactionManagerServiceMBean
Returns:
the number of transactions that have been committed

getRollbackCount

public long getRollbackCount()
The number of rollbacks.

Specified by:
getRollbackCount in interface TransactionManagerServiceMBean
Returns:
the number of transactions that have been rolled back

registerXAExceptionFormatter

public void registerXAExceptionFormatter(Class clazz,
                                         XAExceptionFormatter formatter)
The registerXAExceptionFormatter method

Specified by:
registerXAExceptionFormatter in interface TransactionManagerServiceMBean
Parameters:
clazz - a Class value
formatter - a XAExceptionFormatter value

unregisterXAExceptionFormatter

public void unregisterXAExceptionFormatter(Class clazz)
The unregisterXAExceptionFormatter method

Specified by:
unregisterXAExceptionFormatter in interface TransactionManagerServiceMBean
Parameters:
clazz - a Class value

getObjectInstance

public Object getObjectInstance(Object obj,
                                Name name,
                                Context nameCtx,
                                Hashtable environment)
                         throws Exception
Specified by:
getObjectInstance in interface ObjectFactory
Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.