Handing of Exceptions with an Automatic Rollback

The default behaviour for dealing with SSO Java exceptions is that the PROIV Virtual Machine treats them as fatal, and a PROIV automatic rollback is performed. SSO Java exception rollback information appears using the @RFUNCT function.

Note: Java errors, such as failure to start the Java Virtual Machine or failure to find the SSOManager class, always cause a rollback, since these are not handled by PROIV Developer.

Handling of Exceptions by PROIV Developer

However, this behaviour can be changed in logic to prevent a rollback if the exception is not fatal. You can specify that PROIV Developer handles the exceptions by using the SSOManager method.

For example, the following logic forces PROIV Developer to handle SSO exceptions:

SSOManager.ExceptionsRollback (FALSE)

The following logic forces PROIV Virtual Machine to handle SSO exceptions:

SSOManager.ExceptionsRollback (TRUE)

 

Note: The default exception handling behaviour is always rollback in the absence of an SSOManager.ExceptionsRollback call.

When PROIV Developer is configured to handle SSO exceptions, it has a further level of granularity of error handling. You can retrieve error handling for the next SSO method or property call encountered, in order of execution.

For example, the following logic retrieves error handling for the next SSO method or property call:

SSOManager.NextExceptionRollsBack(TRUE)

This can be turned off with:

SSOManager.NextExceptionRollsBack(FALSE)

There are other SSOManager methods, which are available for use by the developer in logic.

These are:

Click here to view programmatic examples of how Java exceptions can be handled in PROIV Developer.

Handling of Exceptions by JavaBeans

The SSOManager method can also be wrapped in a JavaBean so that the exception is caught in the wrapper and PROIV does not encounter the exception. If the circumstances causing the exception need to be passed to PROIV, this can be achieved via a return code or a parameter.

Section links:

SSO Java Exception Automatic Rollback describes how @RFUNCT function displays SSO Java exception details.

SSO Automatic Rollback Alert provides descriptions of the fields on the Automatic Rollback Alert window.

SSO Java Exception Error Details provides descriptions of the fields on the Error Details window.

Automatic Rollback provides an overview of how the PROIV automatic rollback works.

SSOManager Method Examples provides programmatic examples of how to handle Java exceptions with PROIV Developer.

SSO Runtime Error Messages lists the SSO errors messages that may be encountered at runtime.

SSO Function Build Error Messages lists the SSO errors messages that may be encountered at function build (gen) time.

 

Comment on this topic

Topic ID: 500580