|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.transaction.JavaEETransactionManagerSimplified
@Service public class JavaEETransactionManagerSimplified
Implementation of javax.transaction.TransactionManager interface. This class provides non-XA local transaction support and delegates to implementation of the JavaEETransactionManagerDelegate for XA or LAO optimization, and complete JTS implementation.
| Field Summary | |
|---|---|
protected java.util.logging.Logger |
_logger
|
protected InvocationManager |
invMgr
|
| Constructor Summary | |
|---|---|
JavaEETransactionManagerSimplified()
|
|
| Method Summary | |
|---|---|
void |
begin()
|
void |
begin(int timeout)
This method is introduced as part of implementing the local transaction timeout capability. |
void |
checkTransactionExport(boolean isLocal)
Called from the CORBA Interceptors on the client-side when a client makes a call to a remote object (not in the same JVM). |
void |
checkTransactionImport()
Called from the CORBA Interceptors on the server-side when the server is replying to the client (local + remote client). |
void |
cleanTxnTimeout()
|
void |
clearThreadTx()
Clears the transaction associated with the caller thread |
void |
commit()
|
void |
componentDestroyed(java.lang.Object instance)
|
void |
componentDestroyed(java.lang.Object instance,
ComponentInvocation inv)
|
void |
componentDestroyed(ResourceHandler rh)
|
JavaEETransaction |
createImportedTransaction(TransactionInternal jtsTx)
|
void |
delistComponentResources(boolean suspend)
|
boolean |
delistResource(Transaction tran,
TransactionalResource h,
int flag)
|
void |
enlistComponentResources()
|
boolean |
enlistResource(Transaction tran,
TransactionalResource h)
|
protected boolean |
enlistXAResource(Transaction tran,
TransactionalResource h)
|
void |
forceRollback(java.lang.String txnId)
|
void |
freeze()
|
java.util.ArrayList |
getActiveTransactions()
|
JavaEETransaction |
getCurrentTransaction()
|
int |
getEffectiveTimeout()
|
java.util.List |
getExistingResourceList(java.lang.Object instance,
ComponentInvocation inv)
|
java.util.logging.Logger |
getLogger()
|
int |
getPurgeCancelledTtransactionsAfter()
Returns the value to be used to purge transaction tasks after the specified number of cancelled tasks. |
java.util.List |
getResourceList(java.lang.Object instance,
ComponentInvocation inv)
get the resources being used in the calling component's invocation context |
int |
getStatus()
|
static java.lang.String |
getStatusAsString(int status)
|
Transaction |
getTransaction()
|
TransactionAdminBean |
getTransactionAdminBean(Transaction tran)
|
java.lang.String |
getTxLogLocation()
|
XAResourceWrapper |
getXAResourceWrapper(java.lang.String clName)
|
XATerminator |
getXATerminator()
This is used by importing transactions via the Connector contract. |
void |
handlePropertyUpdate(java.lang.String name,
java.lang.Object value)
|
void |
initRecovery(boolean force)
|
boolean |
isDelegate(JavaEETransactionManagerDelegate d)
|
boolean |
isFrozen()
XXX ??? |
boolean |
isInvocationStackEmpty()
|
boolean |
isNullTransaction()
Return true if a "null transaction context" was received from the client. |
boolean |
isTimedOut()
|
void |
monitorTxBegin(Transaction tx)
|
protected void |
monitorTxCompleted(java.lang.Object obj,
boolean committed)
|
void |
monitorTxCompleted0(java.lang.Object obj,
boolean b)
|
void |
postConstruct()
|
void |
postInvoke(ComponentInvocation curr,
ComponentInvocation prev)
|
void |
preInvoke(ComponentInvocation prev)
|
void |
recover(XAResource[] resourceList)
|
boolean |
recoverIncompleteTx(boolean delegated,
java.lang.String logPath,
XAResource[] xaresArray)
|
void |
recreate(Xid xid,
long timeout)
Recreate a transaction based on the Xid. |
void |
registerComponentResource(TransactionalResource h)
|
void |
registerRecoveryResourceHandler(XAResource xaResource)
|
void |
registerSynchronization(Synchronization sync)
|
void |
release(Xid xid)
Release a transaction. |
boolean |
resourceEnlistable(TransactionalResource h)
|
void |
resume(Transaction tobj)
|
void |
rollback()
|
void |
setCurrentTransaction(JavaEETransaction t)
|
void |
setDefaultTransactionTimeout(int seconds)
|
void |
setDelegate(JavaEETransactionManagerDelegate d)
|
void |
setMonitoringEnabled(boolean enabled)
|
void |
setPurgeCancelledTtransactionsAfter(int num)
Modify the value to be used to purge transaction tasks after the specified number of cancelled tasks. |
void |
setRollbackOnly()
|
void |
setTransactionCompeting(boolean b)
|
void |
setTransactionTimeout(int seconds)
Modify the value of the timeout value that is associated with the transactions started by the current thread with the begin method. |
void |
shutdown()
|
void |
startJTSTx(JavaEETransaction t)
|
Transaction |
suspend()
|
void |
unfreeze()
|
void |
unregisterComponentResource(TransactionalResource h)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.logging.Logger _logger
protected InvocationManager invMgr
| Constructor Detail |
|---|
public JavaEETransactionManagerSimplified()
| Method Detail |
|---|
public void postConstruct()
postConstruct in interface org.jvnet.hk2.component.PostConstructpublic void clearThreadTx()
clearThreadTx in interface JavaEETransactionManagerpublic java.lang.String getTxLogLocation()
getTxLogLocation in interface JavaEETransactionManagerpublic void registerRecoveryResourceHandler(XAResource xaResource)
registerRecoveryResourceHandler in interface JavaEETransactionManagerpublic boolean isNullTransaction()
isNullTransaction in interface JavaEETransactionManagerpublic void shutdown()
shutdown in interface JavaEETransactionManagerpublic void initRecovery(boolean force)
initRecovery in interface JavaEETransactionManagerpublic void recover(XAResource[] resourceList)
recover in interface JavaEETransactionManager
public boolean enlistResource(Transaction tran,
TransactionalResource h)
throws RollbackException,
java.lang.IllegalStateException,
SystemException
enlistResource in interface JavaEETransactionManagerRollbackException
java.lang.IllegalStateException
SystemExceptionpublic void unregisterComponentResource(TransactionalResource h)
unregisterComponentResource in interface JavaEETransactionManager
public void startJTSTx(JavaEETransaction t)
throws RollbackException,
java.lang.IllegalStateException,
SystemException
RollbackException
java.lang.IllegalStateException
SystemException
public java.util.List getResourceList(java.lang.Object instance,
ComponentInvocation inv)
getResourceList in interface JavaEETransactionManagerinstance - Calling component instanceinv - Calling component's invocation information
public void enlistComponentResources()
throws java.rmi.RemoteException
enlistComponentResources in interface JavaEETransactionManagerjava.rmi.RemoteException
public boolean delistResource(Transaction tran,
TransactionalResource h,
int flag)
throws java.lang.IllegalStateException,
SystemException
delistResource in interface JavaEETransactionManagerjava.lang.IllegalStateException
SystemException
public void delistComponentResources(boolean suspend)
throws java.rmi.RemoteException
delistComponentResources in interface JavaEETransactionManagerjava.rmi.RemoteExceptionpublic void registerComponentResource(TransactionalResource h)
registerComponentResource in interface JavaEETransactionManager
public java.util.List getExistingResourceList(java.lang.Object instance,
ComponentInvocation inv)
getExistingResourceList in interface JavaEETransactionManager
public void preInvoke(ComponentInvocation prev)
throws InvocationException
preInvoke in interface JavaEETransactionManagerInvocationException
public void postInvoke(ComponentInvocation curr,
ComponentInvocation prev)
throws InvocationException
postInvoke in interface JavaEETransactionManagerInvocationExceptionpublic void componentDestroyed(java.lang.Object instance)
componentDestroyed in interface JavaEETransactionManager
public void componentDestroyed(java.lang.Object instance,
ComponentInvocation inv)
componentDestroyed in interface JavaEETransactionManagerpublic void componentDestroyed(ResourceHandler rh)
componentDestroyed in interface JavaEETransactionManagerpublic boolean isTimedOut()
isTimedOut in interface JavaEETransactionManagerpublic void checkTransactionImport()
checkTransactionImport in interface JavaEETransactionManagerpublic void checkTransactionExport(boolean isLocal)
checkTransactionExport in interface JavaEETransactionManagerjava.lang.RuntimeException - if the transaction is not exportablepublic XATerminator getXATerminator()
getXATerminator in interface JavaEETransactionManagerXATerminator instance.
java.lang.UnsupportedOperationException
public void release(Xid xid)
throws WorkException
This is used by importing transactions via the Connector contract.
release in interface JavaEETransactionManagerxid - the Xid object representing a transaction.
WorkException
public void recreate(Xid xid,
long timeout)
throws WorkException
This is used by importing transactions via the Connector contract.
recreate in interface JavaEETransactionManagerxid - the Xid object representing a transaction.
WorkException
public void registerSynchronization(Synchronization sync)
throws java.lang.IllegalStateException,
SystemException
registerSynchronization in interface JavaEETransactionManagerjava.lang.IllegalStateException
SystemException
public void begin()
throws NotSupportedException,
SystemException
begin in interface TransactionManagerNotSupportedException
SystemException
public void begin(int timeout)
throws NotSupportedException,
SystemException
begin in interface JavaEETransactionManagerNotSupportedException
SystemException
public void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
java.lang.SecurityException,
java.lang.IllegalStateException,
SystemException
commit in interface TransactionManagerRollbackException
HeuristicMixedException
HeuristicRollbackException
java.lang.SecurityException
java.lang.IllegalStateException
SystemException
public void rollback()
throws java.lang.IllegalStateException,
java.lang.SecurityException,
SystemException
rollback in interface TransactionManagerjava.lang.IllegalStateException
java.lang.SecurityException
SystemException
public int getStatus()
throws SystemException
getStatus in interface TransactionManagerSystemException
public Transaction getTransaction()
throws SystemException
getTransaction in interface TransactionManagerSystemException
public void setRollbackOnly()
throws java.lang.IllegalStateException,
SystemException
setRollbackOnly in interface TransactionManagerjava.lang.IllegalStateException
SystemException
public Transaction suspend()
throws SystemException
suspend in interface TransactionManagerSystemException
public void resume(Transaction tobj)
throws InvalidTransactionException,
java.lang.IllegalStateException,
SystemException
resume in interface TransactionManagerInvalidTransactionException
java.lang.IllegalStateException
SystemException
public void setTransactionTimeout(int seconds)
throws SystemException
If an application has not called this method, the transaction service uses some default value for the transaction timeout.
setTransactionTimeout in interface TransactionManagerSystemException - Thrown if the transaction manager
encounters an unexpected error conditionpublic void setPurgeCancelledTtransactionsAfter(int num)
setPurgeCancelledTtransactionsAfter in interface JavaEETransactionManagerpublic int getPurgeCancelledTtransactionsAfter()
getPurgeCancelledTtransactionsAfter in interface JavaEETransactionManagerpublic JavaEETransaction getCurrentTransaction()
getCurrentTransaction in interface JavaEETransactionManagerpublic void setCurrentTransaction(JavaEETransaction t)
setCurrentTransaction in interface JavaEETransactionManagerpublic XAResourceWrapper getXAResourceWrapper(java.lang.String clName)
getXAResourceWrapper in interface JavaEETransactionManager
public void handlePropertyUpdate(java.lang.String name,
java.lang.Object value)
handlePropertyUpdate in interface JavaEETransactionManager
public boolean recoverIncompleteTx(boolean delegated,
java.lang.String logPath,
XAResource[] xaresArray)
throws java.lang.Exception
recoverIncompleteTx in interface JavaEETransactionManagerjava.lang.Exceptionpublic void freeze()
freeze in interface JavaEETransactionManagerpublic void unfreeze()
unfreeze in interface JavaEETransactionManagerpublic boolean isFrozen()
isFrozen in interface JavaEETransactionManagerpublic void cleanTxnTimeout()
cleanTxnTimeout in interface JavaEETransactionManagerpublic int getEffectiveTimeout()
public void setDefaultTransactionTimeout(int seconds)
setDefaultTransactionTimeout in interface JavaEETransactionManagerpublic java.util.ArrayList getActiveTransactions()
getActiveTransactions in interface JavaEETransactionManager
public TransactionAdminBean getTransactionAdminBean(Transaction tran)
throws SystemException
SystemException
public void forceRollback(java.lang.String txnId)
throws java.lang.IllegalStateException,
SystemException
forceRollback in interface JavaEETransactionManagerjava.lang.IllegalStateException
SystemExceptionpublic void setMonitoringEnabled(boolean enabled)
setMonitoringEnabled in interface JavaEETransactionManager
protected void monitorTxCompleted(java.lang.Object obj,
boolean committed)
public static java.lang.String getStatusAsString(int status)
protected boolean enlistXAResource(Transaction tran,
TransactionalResource h)
throws RollbackException,
java.lang.IllegalStateException,
SystemException
RollbackException
java.lang.IllegalStateException
SystemExceptionpublic boolean isDelegate(JavaEETransactionManagerDelegate d)
public void setDelegate(JavaEETransactionManagerDelegate d)
setDelegate in interface JavaEETransactionManagerpublic java.util.logging.Logger getLogger()
public void monitorTxCompleted0(java.lang.Object obj,
boolean b)
public void monitorTxBegin(Transaction tx)
public boolean resourceEnlistable(TransactionalResource h)
public boolean isInvocationStackEmpty()
public void setTransactionCompeting(boolean b)
public JavaEETransaction createImportedTransaction(TransactionInternal jtsTx)
throws SystemException
SystemException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||