jrun.transaction
Class ClusterTransactionCoordinator
jrunx.kernel.ServiceAdapter
|
+--jrun.transaction.ClusterTransactionCoordinator
- All Implemented Interfaces:
- ClusterTransactionCoordinatorMBean, javax.naming.Referenceable, java.io.Serializable, Service, ServiceMBean, TransactionInterceptor
- public class ClusterTransactionCoordinator
- extends ServiceAdapter
- implements TransactionInterceptor, ClusterTransactionCoordinatorMBean
- See Also:
- Serialized Form
| 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 |
|
Method Summary |
void |
begin(javax.transaction.xa.Xid xid)
Called to indicate that a transaction has begun. |
void |
commit(javax.transaction.xa.Xid xid)
Called to indicate that a transaction has been asked to commit. |
void |
completed(javax.transaction.xa.Xid xid,
int heuristic)
Called to indicate that a heuristic decision has been made
regarding this transaction and the outcome of such a
decision. |
void |
destroy()
Every service is eventually destroyed. |
int |
getTransactionStatus(javax.transaction.xa.Xid xid)
|
void |
initializeTransactionCache()
|
void |
resume(javax.transaction.xa.Xid xid,
java.lang.Thread thread)
Called to indicate that a transaction is been resumed in
the specified thread. |
void |
rollback(javax.transaction.xa.Xid xid)
Called to indicate that a transaction has been asked to
rollback. |
void |
start()
Every service other than mere data collections should start |
void |
suspend(javax.transaction.xa.Xid xid,
java.lang.Thread thread)
Called to indicate that a transaction has been suspended
from the specified thread, and the thread is no longer
associated with the transaction. |
| Methods inherited from class jrunx.kernel.ServiceAdapter |
bind, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, init, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, stop, toString, unbind, unscheduleRunnable, updateStatus |
ClusterTransactionCoordinator
public ClusterTransactionCoordinator(TXDomainService domainService)
start
public void start()
throws java.lang.Exception
- Description copied from class:
ServiceAdapter
- Every service other than mere data collections should start
- Overrides:
start in class ServiceAdapter
destroy
public void destroy()
throws java.lang.Exception
- Description copied from class:
ServiceAdapter
- Every service is eventually destroyed. Convenience implementation.
- Overrides:
destroy in class ServiceAdapter
initializeTransactionCache
public void initializeTransactionCache()
throws java.lang.Exception
getTransactionStatus
public int getTransactionStatus(javax.transaction.xa.Xid xid)
- Specified by:
getTransactionStatus in interface ClusterTransactionCoordinatorMBean
begin
public void begin(javax.transaction.xa.Xid xid)
- Called to indicate that a transaction has begun. The
transactions's identifier is provided.
- Specified by:
begin in interface TransactionInterceptor
- Parameters:
Xid - The transaction identifier
commit
public void commit(javax.transaction.xa.Xid xid)
throws javax.transaction.RollbackException
- Called to indicate that a transaction has been asked to commit.
Called prior to committing the transaction, and the outcome
of this method call might affect the result. If the method
throws a
RollbackException or marks the transaction
for rollback, the transaction will not commit.
- Specified by:
commit in interface TransactionInterceptor
- Parameters:
xid - The transaction identifier- Throws:
RollbackException - Thrown to indicate that the
transaction must not commit
rollback
public void rollback(javax.transaction.xa.Xid xid)
- Called to indicate that a transaction has been asked to
rollback. Called prior to rolling back the transaction.
All exceptions are ignored.
- Specified by:
rollback in interface TransactionInterceptor
- Parameters:
xid - The transaction identifier
completed
public void completed(javax.transaction.xa.Xid xid,
int heuristic)
- Called to indicate that a heuristic decision has been made
regarding this transaction and the outcome of such a
decision. Called after the transaction had been completed
and prior to forgetting about the transaction.
- Specified by:
completed in interface TransactionInterceptor
- Parameters:
xid - The transaction identifierheuristic - The heuristic decision
resume
public void resume(javax.transaction.xa.Xid xid,
java.lang.Thread thread)
throws javax.transaction.InvalidTransactionException
- Called to indicate that a transaction is been resumed in
the specified thread. The thread is now associated with
the transaction. May affect the outcome of this operation
by throwing a
InvalidTransactionException to prevent
the thread from resuming.
- Specified by:
resume in interface TransactionInterceptor
- Parameters:
xid - The transaction identifierthread - The associated thread- Throws:
javax.transaction.InvalidTransactionException - Prevents the thread
from being associated with this transaction
suspend
public void suspend(javax.transaction.xa.Xid xid,
java.lang.Thread thread)
- Called to indicate that a transaction has been suspended
from the specified thread, and the thread is no longer
associated with the transaction.
- Specified by:
suspend in interface TransactionInterceptor
- Parameters:
xid - The transaction identifierthread - The associated thread
Copyright � 2002 Macromedia Corporation. All Rights Reserved.