Package com.arjuna.ats.jbossatx.jts
Class TransactionManagerDelegate
- java.lang.Object
-
- com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate
-
- com.arjuna.ats.jbossatx.jts.TransactionManagerDelegate
-
- All Implemented Interfaces:
javax.naming.spi.ObjectFactory,javax.transaction.TransactionManager,org.jboss.tm.listener.TransactionListenerRegistry,org.jboss.tm.TransactionLocalDelegate,org.jboss.tm.TransactionTimeoutConfiguration
public class TransactionManagerDelegate extends BaseTransactionManagerDelegate implements javax.naming.spi.ObjectFactory
-
-
Constructor Summary
Constructors Constructor Description TransactionManagerDelegate()Construct the delegate with the appropriate transaction manager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetObjectInstance(java.lang.Object initObj, javax.naming.Name relativeName, javax.naming.Context namingContext, java.util.Hashtable env)Get the transaction manager from the factory.longgetTimeLeftBeforeTransactionTimeout(boolean errorRollback)Get the time left before transaction timeoutintgetTransactionTimeout()Get the transaction timeout.-
Methods inherited from class com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate
addListener, begin, commit, containsValue, getStatus, getTransaction, getValue, lock, resume, rollback, setRollbackOnly, setTransactionTimeout, storeValue, suspend, unlock
-
-
-
-
Method Detail
-
getTransactionTimeout
public int getTransactionTimeout() throws javax.transaction.SystemExceptionGet the transaction timeout.- Specified by:
getTransactionTimeoutin interfaceorg.jboss.tm.TransactionTimeoutConfiguration- Returns:
- the timeout in seconds associated with this thread
- Throws:
javax.transaction.SystemException- for any error
-
getTimeLeftBeforeTransactionTimeout
public long getTimeLeftBeforeTransactionTimeout(boolean errorRollback) throws javax.transaction.RollbackExceptionGet the time left before transaction timeout- Specified by:
getTimeLeftBeforeTransactionTimeoutin interfaceorg.jboss.tm.TransactionTimeoutConfiguration- Parameters:
errorRollback- throw an error if the transaction is marked for rollback- Returns:
- the remaining in the current transaction or -1 if there is no transaction
- Throws:
javax.transaction.RollbackException- if the transaction is marked for rollback and errorRollback is true
-
getObjectInstance
public java.lang.Object getObjectInstance(java.lang.Object initObj, javax.naming.Name relativeName, javax.naming.Context namingContext, java.util.Hashtable env) throws java.lang.ExceptionGet the transaction manager from the factory.- Specified by:
getObjectInstancein interfacejavax.naming.spi.ObjectFactory- Parameters:
initObj- The initialisation object.relativeName- The instance name relative to the context.namingContext- The naming context for the instance.env- The environment.- Throws:
java.lang.Exception
-
-