You might want to code your application to perform a given action
if a certain kind of exception is the root-cause of a failure and is nested
within the exception that you receive. The default behavior in the product
might mask a nested or root-cause exception in your application.
About this task
The Enterprise JavaBeans (EJB) container creates a TransactionRolledbackException
exception for a remote client when it can create a RemoteException exception
instead. With the RemoteException exception, the container does not lose the
ability to have root-cause information nested inside the exception.
You
can set the following Java virtual machine (JVM) system property to true through
the administrative console for the product: com.ibm.websphere.ejbcontainer.includeRootExceptionOnRollback
This change enables the remote client to receive nested exceptions when a
rollback occurs.
Note: This property is applicable only for scenarios
where the transaction in which the bean method is running was started by the
container for this specific method invocation. All of the other scenarios
must result in a TransactionRollBackException exception according to the EJB
specification.