@Contract
public interface JavaEETransactionManagerDelegate
| Modifier and Type | Method and Description |
|---|---|
void |
acquireWriteLock()
Allows the delegate to acquire a write lock.
|
void |
commitDistributedTransaction()
Commit distributed transaction if there is any.
|
boolean |
enlistDistributedNonXAResource(Transaction tran,
TransactionalResource h)
Perform implementation specific steps to enlist a non-XA resource
with a distribute transaction.
|
boolean |
enlistLAOResource(Transaction tran,
TransactionalResource h)
Perform implementation specific steps to enlist resource as a LAO.
|
JavaEETransaction |
getJavaEETransaction(Transaction t)
Get local transaction object that corresponds to this transaction instance.
|
int |
getOrder()
The delegate with the largest order will be used.
|
Lock |
getReadLock()
Return the delegate specific read lock that implements Lock interface.
|
int |
getStatus()
Get implementation specific status of the transaction associated with
the current thread.
|
Transaction |
getTransaction()
Get implementation specific transaction object that represents the transaction
context of the calling thread.
|
TransactionAdminBean |
getTransactionAdminBean(Transaction t)
Return TransactionAdminBean with delegate specific implementation details
of an active Transaction.
|
String |
getTxLogLocation()
Return location of transaction logs
|
XAResourceWrapper |
getXAResourceWrapper(String clName)
Returns an instance of an XAResourceWrapper if this delegate supports
transaction recovery and there is a wrapper available for this class name.
|
javax.resource.spi.XATerminator |
getXATerminator()
This is used by importing transactions via the Connector contract.
|
void |
handlePropertyUpdate(String name,
Object value)
Handle configuration change.
|
void |
initRecovery(boolean force)
Initialize recovery framework.
|
boolean |
isNullTransaction()
Return the delegate specific implementation when a "null transaction context"
was received from the client.
|
boolean |
isWriteLocked()
Return
true if the delegate had its write lock acquired. |
void |
recover(XAResource[] resourceList)
Recover an array of XAResource objects for a failed XA transaction.
|
boolean |
recoverIncompleteTx(boolean delegated,
String logPath,
XAResource[] xaresArray)
Recover the populated array of XAResource if this delegate supports
transaction recovery.
|
void |
recreate(Xid xid,
long timeout)
Recreate a transaction based on the Xid.
|
void |
registerRecoveryResourceHandler(XAResource xaResource)
Allows an arbitrary XAResource to register for recovery
|
void |
release(Xid xid)
Release a transaction.
|
void |
releaseWriteLock()
Allows the delegate to release a write lock.
|
void |
removeTransaction(Transaction tx)
Remove the Transaction object from the cache.
|
void |
resume(Transaction tx)
Perform implementation specific steps to resume a Transaction.
|
void |
rollbackDistributedTransaction()
Rollback distributed transaction if there is any.
|
void |
setRollbackOnlyDistributedTransaction()
Perform implementation specific steps to set setRollbackOnly status
for distributed transaction if there is any.
|
void |
setTransactionManager(JavaEETransactionManager tm)
Set the JavaEETransactionManager reference.
|
void |
setUseLAO(boolean b)
Reset LAO value.
|
TransactionInternal |
startJTSTx(JavaEETransaction t,
boolean isAssociatedTimeout)
Start new JTS transaction for the existing local transaction object.
|
boolean |
supportsXAResource()
Returns
true> if this delegate supports XA resources. |
Transaction |
suspend(JavaEETransaction tx)
Perform implementation specific steps to suspend a JavaEETransaction.
|
boolean |
useLAO()
Returns
true if this implementation supports
last agent optimization. |
boolean useLAO()
true if this implementation supports
last agent optimization.void setUseLAO(boolean b)
b - the boolean value for the LAO flag.void commitDistributedTransaction()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SecurityException,
IllegalStateException,
SystemException
void rollbackDistributedTransaction()
throws IllegalStateException,
SecurityException,
SystemException
int getStatus()
throws SystemException
SystemExceptionTransaction getTransaction() throws SystemException
SystemExceptionJavaEETransaction getJavaEETransaction(Transaction t)
boolean enlistDistributedNonXAResource(Transaction tran, TransactionalResource h) throws RollbackException, IllegalStateException, SystemException
tran - the Transaction object to be used to enlist the resource.h - the TransactionalResource object to be enlisted.true if the resource was enlisted successfully.RollbackExceptionIllegalStateExceptionSystemExceptionboolean enlistLAOResource(Transaction tran, TransactionalResource h) throws RollbackException, IllegalStateException, SystemException
tran - the Transaction object to be used to enlist the resource.h - the TransactionalResource object to be enlisted.true if the resource was enlisted successfully.RollbackExceptionIllegalStateExceptionSystemExceptionvoid setRollbackOnlyDistributedTransaction()
throws IllegalStateException,
SystemException
IllegalStateExceptionSystemExceptionTransaction suspend(JavaEETransaction tx) throws SystemException
tx - the JavaEETransaction object to be suspend.SystemExceptionvoid resume(Transaction tx) throws InvalidTransactionException, IllegalStateException, SystemException
tx - the Transaction object that represents the transaction to be resumed.InvalidTransactionExceptionIllegalStateExceptionSystemExceptionvoid removeTransaction(Transaction tx)
tx - the Transaction object to be removed.int getOrder()
void setTransactionManager(JavaEETransactionManager tm)
tm - the JavaEETransactionManager object.boolean supportsXAResource()
true> if this delegate supports XA resources.TransactionInternal startJTSTx(JavaEETransaction t, boolean isAssociatedTimeout) throws RollbackException, IllegalStateException, SystemException
t - the JavaEETransaction object.isAssociatedTimeout - true if transaction has a timeout
associated with it.RollbackExceptionIllegalStateExceptionSystemExceptionvoid recover(XAResource[] resourceList)
resourceList - the array of XAResource objects to recover.UnsupportedOperationException - if a delegate doesn't support
this functionality.void initRecovery(boolean force)
javax.resource.spi.XATerminator getXATerminator()
XATerminator instance.UnsupportedOperationException - if a delegate doesn't support
this functionality.void release(Xid xid) throws javax.resource.spi.work.WorkException
This is used by importing transactions via the Connector contract.
xid - the Xid object representing a transaction.UnsupportedOperationException - if a delegate doesn't support
this functionality.javax.resource.spi.work.WorkExceptionvoid recreate(Xid xid, long timeout) throws javax.resource.spi.work.WorkException
This is used by importing transactions via the Connector contract.
xid - the Xid object representing a transaction.timeout - the timeout for the transaction to be recreated.UnsupportedOperationException - if a delegate doesn't support
this functionality.javax.resource.spi.work.WorkExceptionXAResourceWrapper getXAResourceWrapper(String clName)
null otherwise.null if this
delegate doesn't support transaction recovery or a wrapper is not available.void handlePropertyUpdate(String name, Object value)
name - the name of the configuration property.value - the ne value of the configuration.boolean recoverIncompleteTx(boolean delegated,
String logPath,
XAResource[] xaresArray)
throws Exception
delegated - true if the recovery process is owned by this instance.logPath - the name of the transaction logging directoryxaresArray - the array of XA Resources to be recovered.ExceptionLock getReadLock()
boolean isWriteLocked()
true if the delegate had its write lock acquired.void acquireWriteLock()
void releaseWriteLock()
boolean isNullTransaction()
TransactionAdminBean getTransactionAdminBean(Transaction t) throws SystemException
SystemExceptionString getTxLogLocation()
void registerRecoveryResourceHandler(XAResource xaResource)
xaResource - XAResource to register for recoveryCopyright © 2017. All rights reserved.