Transaction service exceptions


The WAS transaction service throws two types of exceptions...

If the EJB container catches a system exception from the business method of an enterprise bean, and the method is running within a container-managed transaction, the container rolls back the transaction before passing the exception on to the client.

InvalidTransactionException Request carried an invalid transaction context.

TransactionRequiredException Request carried a null transaction context, but the target object requires an active transaction.

TransactionRolledbackException The transaction associated with processing of the request has been rolled back, or marked for roll back. Thus the requested operation either could not be performed or was not performed because further computation on behalf of the transaction would be fruitless.


Heuristic exceptions

A heuristic decision is a unilateral decision made by one or more participants in a transaction to commit or rollback updates without first obtaining the consensus outcome determined by the Transaction Service. Heuristic decisions are an issue only after the participant has been prepared and the second phase of commit processing is underway. Heuristic decisions are normally made only in unusual circumstances, such as repeated failures by the transaction manager to communicate with a resource manage during two-phase commit. If a heuristic decision is taken, there is a risk that the decision differs from the consensus outcome, resulting in a loss of data integrity.

HeuristicRollback All relevant updates have been rolled back.

HeuristicMixed Some relevant updates have been committed and others have been rolled back.

All heuristic exceptions are defined in the Java Transaction API (JTA) 1.0.1 Specification


See Also

Troubleshooting transactions
Using the transaction service