3.7.1 Handling Exceptions

Errors or failures that may occur when Jolt initiates a Tuxedo service call are reported to your application through Java exceptions. Always enclose the call() method within a try / catch block and attempt to deal with any exceptions appropriately. The call() method can throw any of the following exceptions for the following reasons:

  • bea.jolt.pool.ApplicationException

Thrown when an error occurs in the logic of the Tuxedo service. For example, a client illegally attempts to use a withdrawal service to withdraw more money from an account than the current balance. The ApplicationException is thrown when the Tuxedo service returns a TPESVCFAIL. Application-specific information about the error can be included in the Result object that was returned from the service invocation. You can access the Result object through the ApplicationException.getResult() method.

Ensure to use the full package name of the bea.jolt.pool.ApplicationException, because Jolt defines another exception whose full package name is bea.jolt.ApplicationException.

  • bea.jolt.JoltException

    A JoltException is the super class of all the following exceptions. These exceptions all signify that a system error has occurred that is not part of the application logic. JoltException is documented in Appendix A, “Oracle Jolt Exceptions,” in the Using Oracle Jolt.

  • bea.jolt.pool.SessionPoolException

    Thrown when an error occurs in the Jolt SessionPool. For example, this may occur if all sessions are busy, or if the session pool is suspended.

  • bea.jolt.ServiceException

    Thrown when an error occurs related to invoking the Tuxedo service that contains the application. For example, a service timeout, or a non-existent service is called.

  • bea.jolt.TransactionException

    Thrown when a transaction cannot be either started, committed, or aborted.