Package com.ibm.tx.jta
Interface ExtendedTransactionManager
-
- All Superinterfaces:
javax.transaction.TransactionManager
public interface ExtendedTransactionManager extends javax.transaction.TransactionManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
begin(int timeout)
Adds a begin method allowing a timeout to be specified.boolean
delist(javax.transaction.xa.XAResource xaRes, int flag)
Delist the resource specified from the current JTA Transaction associated with the calling thread.boolean
enlist(javax.transaction.xa.XAResource xaRes, int recoveryId)
enlist XAResouce object in the current JTA Transaction associated with current thread.int
registerResourceInfo(java.lang.String xaResFactoryClassName, java.io.Serializable xaResInfo)
Register XAResouceFactory and XAResourceInfo with the transaction service so that it will be logged and can be used in recovery on a server restart.int
registerResourceInfo(java.lang.String xaResFactoryClassName, java.io.Serializable xaResInfo, int priority)
Register XAResouceFactory and XAResourceInfo with the transaction service so that it will be logged and can be used in recovery on a server restart.
-
-
-
Method Detail
-
begin
void begin(int timeout) throws javax.transaction.NotSupportedException, javax.transaction.SystemException
Adds a begin method allowing a timeout to be specified.- Parameters:
timeout
-- Throws:
javax.transaction.NotSupportedException
javax.transaction.SystemException
-
enlist
boolean enlist(javax.transaction.xa.XAResource xaRes, int recoveryId) throws javax.transaction.RollbackException, java.lang.IllegalStateException, javax.transaction.SystemException
enlist XAResouce object in the current JTA Transaction associated with current thread. This interface is supposed to be used with JTA XAResource providers who want to participate in distributed transactions managed by JTA TM or JTS. This is a modified form of enlist call that may be used after a previous registerResourceInfo call.- Parameters:
xaRes
- The XAResource object representing the resource to enlist.recoveryId
- The identifier returned from a call to registerResourceInfo associating the appropriate xaResFactoryClassName/xaResInfo necessary for produce a XAResource object.- Returns:
- true if the resource was enlisted successfully; otherwise false.
- Throws:
javax.transaction.RollbackException
java.lang.IllegalStateException
javax.transaction.SystemException
-
delist
boolean delist(javax.transaction.xa.XAResource xaRes, int flag)
Delist the resource specified from the current JTA Transaction associated with the calling thread. XAResources delisted using this method will receive prepare, commit callbacks etc.- Parameters:
xaRes
- The XAResource object representing the resource to delistflag
- One of the values of TMSUCCESS, TMSUSPEND, or TMFAIL.- Returns:
- true if the resource was delisted successfully; otherwise false.
-
registerResourceInfo
int registerResourceInfo(java.lang.String xaResFactoryClassName, java.io.Serializable xaResInfo)
Register XAResouceFactory and XAResourceInfo with the transaction service so that it will be logged and can be used in recovery on a server restart. The token returned is an identifier which should be passed on future enlist calls to associate an enlist with the registered resource information.- Parameters:
xaResFactoryClassName
- The class name of XAResourceFactory.xaResInfo
- Information necessary for producing an XAResource object using XAResourceFactory.- Returns:
- a resource recoveryId value associate with the factory/info which can be used on resource enlistment otherwise -1 if an error occurs.
-
registerResourceInfo
int registerResourceInfo(java.lang.String xaResFactoryClassName, java.io.Serializable xaResInfo, int priority)
Register XAResouceFactory and XAResourceInfo with the transaction service so that it will be logged and can be used in recovery on a server restart. A priority can be defined which will define the order resources are prepared and committed relative to other resources enlisted in a transaction. The token returned is an identifier which should be passed on future enlist calls to associate an enlist with the registered resource information.- Parameters:
xaResFactoryClassName
- The class name of XAResourceFactory.xaResInfo
- Information necessary for producing an XAResource object using XAResourceFactory.priority
- The priority associated with resources for this factory and xa resource information. Priorities may be assigned values in the range Integer.MAX_VALUE through Integer.MIN_VALUE with 0 as the default priority if unassigned. Priority values will determine the order of prepare and commit during the completion phase; the higher the priority, the earlier the resource will be prepared or committed. Resources with the same priority value may be prepared or committed in any order. Priority ordering will be maintained over failures or retries - higher priority resources must complete before lower priority resources are committed.- Returns:
- a resource recoveryId value associate with the factory/info which can be used on resource enlistment otherwise -1 if an error occurs.
-
-