jrun.transaction
Class JRunTransactionService

jrunx.kernel.ServiceAdapter
  |
  +--jrunx.kernel.ServicePartition
        |
        +--jrunx.kernel.ConfigurableServicePartition
              |
              +--jrun.transaction.JRunTransactionService
All Implemented Interfaces:
ConfigurableServicePartitionMBean, JRunTransactionServiceMBean, javax.naming.Referenceable, java.io.Serializable, Service, ServiceMBean, ServicePartitionMBean

public class JRunTransactionService
extends ConfigurableServicePartition
implements JRunTransactionServiceMBean

Partition holding all of the server's TransactionDomains.
All TXDomain child services are init'd, started, stopped, and destroyed automatically as part of the ConfigurableServicePartition logic.

Author:
PS Neville
See Also:
Serialized Form

Field Summary
static java.lang.String TM_JNDI_NAME
           
static java.lang.String USERTX_JNDI_NAME
           
 
Fields inherited from class jrunx.kernel.ServicePartition
sortedServices
 
Fields inherited from class jrunx.kernel.ServiceAdapter
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER
 
Fields inherited from interface jrun.transaction.JRunTransactionServiceMBean
OBJECT_NAME
 
Fields inherited from interface jrunx.kernel.Service
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED
 
Constructor Summary
JRunTransactionService()
           
 
Method Summary
static void enlistXAResource(java.lang.String txDomainName, javax.transaction.xa.XAResource xaRes)
           
static void enlistXAResource(javax.transaction.xa.XAResource xaRes)
           
 TransactionDomain getTransactionDomain()
           
 TransactionDomain getTransactionDomain(java.lang.String txDomainName)
           
 javax.transaction.TransactionManager getTransactionManager()
           
 javax.transaction.TransactionManager getTransactionManager(java.lang.String txDomainName)
           
 javax.transaction.UserTransaction getUserTransaction()
           
 javax.transaction.UserTransaction getUserTransaction(java.lang.String txDomainName)
           
static boolean hasTransaction()
          Returns true if there is a transaction active on the current thread
 void start()
          Every service other than mere data collections should start
 void stop()
          Every service other than mere data collections should stop
 
Methods inherited from class jrunx.kernel.ConfigurableServicePartition
destroy, destroyServices, init, initServices, loadAndInit, loadChildren, setChildElements, startServices, stopServices
 
Methods inherited from class jrunx.kernel.ServicePartition
addService, addService, getServices, invokeChain, iterator, removeService, removeService
 
Methods inherited from class jrunx.kernel.ServiceAdapter
bind, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, toString, unbind, unscheduleRunnable, updateStatus
 
Methods inherited from interface jrunx.kernel.ConfigurableServicePartitionMBean
setChildElements
 
Methods inherited from interface jrunx.kernel.ServicePartitionMBean
addService, addService, iterator, removeService, removeService
 
Methods inherited from interface jrunx.kernel.ServiceMBean
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind
 
Methods inherited from interface jrunx.kernel.Service
destroy, getStatus, init, updateStatus
 

Field Detail

USERTX_JNDI_NAME

public static final java.lang.String USERTX_JNDI_NAME

TM_JNDI_NAME

public static final java.lang.String TM_JNDI_NAME
Constructor Detail

JRunTransactionService

public JRunTransactionService()
Method Detail

enlistXAResource

public static void enlistXAResource(javax.transaction.xa.XAResource xaRes)
                             throws java.lang.Exception

enlistXAResource

public static void enlistXAResource(java.lang.String txDomainName,
                                    javax.transaction.xa.XAResource xaRes)
                             throws java.lang.Exception

start

public void start()
           throws java.lang.Exception
Description copied from class: ServiceAdapter
Every service other than mere data collections should start
Specified by:
start in interface Service
Overrides:
start in class ConfigurableServicePartition

stop

public void stop()
          throws java.lang.Exception
Description copied from class: ServiceAdapter
Every service other than mere data collections should stop
Specified by:
stop in interface Service
Overrides:
stop in class ConfigurableServicePartition

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager(java.lang.String txDomainName)
Specified by:
getTransactionManager in interface JRunTransactionServiceMBean

getUserTransaction

public javax.transaction.UserTransaction getUserTransaction(java.lang.String txDomainName)
Specified by:
getUserTransaction in interface JRunTransactionServiceMBean

getTransactionDomain

public TransactionDomain getTransactionDomain(java.lang.String txDomainName)
Specified by:
getTransactionDomain in interface JRunTransactionServiceMBean

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Specified by:
getTransactionManager in interface JRunTransactionServiceMBean

getUserTransaction

public javax.transaction.UserTransaction getUserTransaction()
Specified by:
getUserTransaction in interface JRunTransactionServiceMBean

getTransactionDomain

public TransactionDomain getTransactionDomain()
Specified by:
getTransactionDomain in interface JRunTransactionServiceMBean

hasTransaction

public static boolean hasTransaction()
Returns true if there is a transaction active on the current thread


Copyright � 2002 Macromedia Corporation. All Rights Reserved.