Setting the system property to enable remote EJB clients to receive nested or root-cause exceptions
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
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.
Procedure
- Open the administrative console.
- Select Servers.
- Select Servers > Application servers > server_name.
- Under Server infrastructure, select Java and Process Management > Process Definition.
- Under Additional properties, select Java virtual machine > Custom properties > New.
- In the Name entry field, type com.ibm.websphere.ejbcontainer.includeRootExceptionOnRollback.
- In the Value entry field, type true.
- Select OK.