org.openejb.core.transaction
Class TxNotSupported
java.lang.Object
|
+--org.openejb.core.transaction.TransactionPolicy
|
+--org.openejb.core.transaction.TxNotSupported
- public class TxNotSupported
- extends TransactionPolicy
17.6.2.1 NotSupported
The Container invokes an enterprise Bean method whose transaction attribute
is set to NotSupported with an unspecified transaction context.
If a client calls with a transaction context, the container suspends the
association of the transaction context with the current thread before
invoking the enterprise bean's business method. The container resumes the
suspended association when the business method has completed. The suspended
transaction context of the client is not passed to the resource managers or
other enterprise Bean objects that are invoked from the business method.
If the business method invokes other enterprise beans, the Container passes
no transaction context with the invocation.
Refer to Subsection 17.6.5 for more details of how the Container can
implement this case.
- Version:
- $Revision: 1.2 $ $Date: 2002/02/08 13:53:18 $
Methods inherited from class org.openejb.core.transaction.TransactionPolicy |
beginTransaction, commitTransaction, discardBeanInstance, getContainer, getTxMngr, handleCallbackException, logSystemException, markTxRollbackOnly, rollbackTransaction, throwAppExceptionToServer, throwExceptionToServer, throwTxExceptionToServer |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TxNotSupported
public TxNotSupported(TransactionContainer container)
TxNotSupported
public TxNotSupported()
beforeInvoke
public void beforeInvoke(javax.ejb.EnterpriseBean instance,
TransactionContext context)
throws SystemException,
ApplicationException
- Overrides:
beforeInvoke
in class TransactionPolicy
afterInvoke
public void afterInvoke(javax.ejb.EnterpriseBean instance,
TransactionContext context)
throws ApplicationException,
SystemException
- Overrides:
afterInvoke
in class TransactionPolicy
handleApplicationException
public void handleApplicationException(java.lang.Throwable appException,
TransactionContext context)
throws ApplicationException
- Container's action
Re-throw AppException
Client's view
Receives AppException.
If the client executes in a transaction, the client's transaction is not
marked for rollback, and client can continue its work.
- Overrides:
handleApplicationException
in class TransactionPolicy
handleSystemException
public void handleSystemException(java.lang.Throwable sysException,
javax.ejb.EnterpriseBean instance,
TransactionContext context)
throws ApplicationException,
SystemException
- A system exception is any exception that is not an Application Exception.
Container's action
-
Log the exception or error so that the System Administrator is alerted of
the problem.
-
Discard instance. The Container must not invoke any business methods or
container callbacks on the instance.
-
Throw RemoteException to remote client;
throw EJBException to local client.
Client's view
Receives RemoteException or EJBException.
If the client executes in a transaction, the client's transaction may or
may not be marked for rollback.
- Overrides:
handleSystemException
in class TransactionPolicy