@Contract public interface JavaEETransactionManager extends TransactionManager
Modifier and Type | Method and Description |
---|---|
void |
begin(int timeout) |
void |
checkTransactionExport(boolean isLocal)
Perform checks during export of a transaction on a remote call.
|
void |
checkTransactionImport()
Perform checks during import of a transaction on a remote call.
|
void |
cleanTxnTimeout() |
void |
clearThreadTx()
Clears the transaction associated with the caller thread
|
void |
componentDestroyed(Object instance)
This is called by Container to indicate that a component
is being destroyed.
|
void |
componentDestroyed(Object instance,
ComponentInvocation inv)
This is called by Container to indicate that a component
is being destroyed.
|
void |
componentDestroyed(ResourceHandler rh)
This is called by Container to indicate that a component
is being destroyed.
|
void |
delistComponentResources(boolean suspend)
This is called by the Container to ask the Transaction
Manager to delist all resources held by a component
The TM finds the component through the InvocationManager
|
boolean |
delistResource(Transaction tran,
TransactionalResource h,
int flag)
Delist the resource specified from the transaction
|
void |
enlistComponentResources()
This is called by the Container to ask the Transaction
Manager to enlist all resources held by a component and
to associate the current Transaction with the current
Invocation
The TM finds the component through the InvocationManager
|
boolean |
enlistResource(Transaction tran,
TransactionalResource h)
Enlist the resource specified with the transaction
|
void |
forceRollback(String txnId) |
void |
freeze() |
ArrayList |
getActiveTransactions() |
JavaEETransaction |
getCurrentTransaction()
Return JavaEETransaction instance associated with the current thread.
|
List |
getExistingResourceList(Object instance,
ComponentInvocation inv)
Returns a list of resource handles held by the component
|
int |
getPurgeCancelledTtransactionsAfter()
Returns the value to be used to purge transaction tasks after the specified number of cancelled tasks
|
List |
getResourceList(Object instance,
ComponentInvocation inv)
get the resources being used in the calling component's invocation context
|
String |
getTxLogLocation()
Return location of transaction logs
|
XAResourceWrapper |
getXAResourceWrapper(String clName)
Return XAResourceWrapper instance specific to this datasource class name
that can be used instead of the driver provided version for transaction recovery.
|
javax.resource.spi.XATerminator |
getXATerminator()
Provides a handle to a
XATerminator instance. |
void |
handlePropertyUpdate(String name,
Object value)
Handle configuration change.
|
void |
initRecovery(boolean force)
Initialize recovery framework
|
boolean |
isFrozen() |
boolean |
isNullTransaction()
Return true if a "null transaction context" was received
from the client or if the server's transaction.interoperability
flag is false.
|
boolean |
isTimedOut()
Utility for the ejb container to check if the transaction is marked for
rollback because of timeout.
|
void |
postInvoke(ComponentInvocation curr,
ComponentInvocation prev)
Called by InvocationManager
|
void |
preInvoke(ComponentInvocation prev)
Called by InvocationManager
|
void |
recover(XAResource[] resourceList) |
boolean |
recoverIncompleteTx(boolean delegated,
String logPath,
XAResource[] xaresArray)
Called by the ResourceRecoveryManager to recover the populated
array of XAResource.
|
void |
recreate(Xid xid,
long timeout)
recreate a transaction based on the Xid.
|
void |
registerComponentResource(TransactionalResource h) |
void |
registerRecoveryResourceHandler(XAResource xaResource)
Allows an arbitrary XAResource to register for recovery
|
void |
registerSynchronization(Synchronization sync)
register a synchronization object with the transaction
associated with the current thread
|
void |
release(Xid xid)
Release a transaction.
|
void |
setCurrentTransaction(JavaEETransaction tx)
Update JavaEETransaction associated with the current thread.
|
void |
setDefaultTransactionTimeout(int seconds) |
void |
setDelegate(JavaEETransactionManagerDelegate delegate)
Explicitly set the JavaEETransactionManagerDelegate instance
for implementation-specific callbacks.
|
void |
setMonitoringEnabled(boolean enabled) |
void |
setPurgeCancelledTtransactionsAfter(int value)
Allows to purge transaction tasks after the specified value of cancelled tasks
|
void |
shutdown()
Perform shutdown cleanup.
|
void |
unfreeze() |
void |
unregisterComponentResource(TransactionalResource h) |
begin, commit, getStatus, getTransaction, resume, rollback, setRollbackOnly, setTransactionTimeout, suspend
void registerSynchronization(Synchronization sync) throws RollbackException, IllegalStateException, SystemException
sync
- the synchronization objectIllegalStateException
- Thrown if the transaction in the
target object is in prepared state or the transaction is inactive.SystemException
- Thrown if the transaction manager
encounters an unexpected error conditionRollbackException
boolean enlistResource(Transaction tran, TransactionalResource h) throws RollbackException, IllegalStateException, SystemException
tran
- The transaction objecth
- The resource handle objectRollbackException
- Thrown to indicate that
the transaction has been marked for rollback only.IllegalStateException
- Thrown if the transaction in the
target object is in prepared state or the transaction is inactive.SystemException
- Thrown if the transaction manager
encounters an unexpected error conditionboolean delistResource(Transaction tran, TransactionalResource h, int flag) throws IllegalStateException, SystemException
tran
- The transaction objecth
- The resource handle objectflag
- One of the values of TMSUCCESS, TMSUSPEND, or TMFAIL.IllegalStateException
- Thrown if the transaction in the
target object is inactive.SystemException
- Thrown if the transaction manager
encounters an unexpected error conditionvoid enlistComponentResources() throws RemoteException
RemoteException
void delistComponentResources(boolean suspend) throws RemoteException
suspend
- true if the resources should be delisted
with TMSUSPEND flag; false otherwiseRemoteException
void componentDestroyed(Object instance, ComponentInvocation inv)
instance
- The component instanceinv
- The ComponentInvocationvoid componentDestroyed(Object instance)
instance
- The component instancevoid componentDestroyed(ResourceHandler rh)
rh
- The ResourceHandlervoid preInvoke(ComponentInvocation prev) throws InvocationException
InvocationException
void postInvoke(ComponentInvocation curr, ComponentInvocation prev) throws InvocationException
InvocationException
void setDefaultTransactionTimeout(int seconds)
void cleanTxnTimeout()
List getExistingResourceList(Object instance, ComponentInvocation inv)
void registerComponentResource(TransactionalResource h)
void unregisterComponentResource(TransactionalResource h)
void recover(XAResource[] resourceList)
void initRecovery(boolean force)
force
- if true, forces initialization, otherwise relies on the TimerService
configuration.void shutdown()
void begin(int timeout) throws NotSupportedException, SystemException
NotSupportedException
SystemException
boolean isNullTransaction()
void checkTransactionExport(boolean isLocal)
void checkTransactionImport()
boolean isTimedOut()
ArrayList getActiveTransactions()
void forceRollback(String txnId) throws IllegalStateException, SystemException
IllegalStateException
SystemException
void setMonitoringEnabled(boolean enabled)
void freeze()
void unfreeze()
boolean isFrozen()
void 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.javax.resource.spi.work.WorkException
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.javax.resource.spi.work.WorkException
javax.resource.spi.XATerminator getXATerminator()
XATerminator
instance. The
XATerminator
instance could be used by a resource adapter
to flow-in transaction completion and crash recovery calls from an EIS.
This is used by importing transactions via the Connector contract.
XATerminator
instance.void setDelegate(JavaEETransactionManagerDelegate delegate)
delegate
- the JavaEETransactionManagerDelegate instance.JavaEETransaction getCurrentTransaction()
void setCurrentTransaction(JavaEETransaction tx)
tx
- the JavaEETransaction associated with the current thread or null
if the existing transaction had been completed.XAResourceWrapper getXAResourceWrapper(String clName)
clName
- the class name of a datasource.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.Exception
List getResourceList(Object instance, ComponentInvocation inv)
instance
- calling component instanceinv
- Calling component's invocation informationvoid clearThreadTx()
String getTxLogLocation()
void registerRecoveryResourceHandler(XAResource xaResource)
xaResource
- XAResource to register for recoveryint getPurgeCancelledTtransactionsAfter()
void setPurgeCancelledTtransactionsAfter(int value)
Copyright © 2018. All rights reserved.