Runtime exceptions and failover for application clients
Application clients can be servlets, JSPs or stand-alone Java applications. In a workload-managed environment, application clients connect to clustered application servers to look up the initial context of the application server.
After the client obtains the initial context, it looks up the home object of the enterprise bean. The WLM plugin code in the client ORB contains all of the information to redirect a failed request to another server within the cluster. If an application exception is thrown, the WLM plugin does not retry the request, because it can not determine whether the request was completed or not.
Runtime exceptions and client interpretations of them:
If all servers are unavailable to process the request, the org.omg.CORBA.NO_IMPLEMENT exception is returned to the client application.
In some cases, including communication failures, failover can not be achieved because the WLM plugin can not determine how much processing the server did before the failure occurred. If a communication failure occurs, the WLM plugin returns a TRANSIENT exception to the client application. The client application may be able to reset the state and send the request again, because other application servers are still available to process the request.
- If an org.org.CORBA.TRANSIENT with minor code: 1229066304 (0x49421040) exception is thrown, the workload management plugin found that the cluster member was in server quiescence mode.
- If an org.org.CORBA.TRANSIENT with minor code: 1229066306 (0x49421042) exception is thrown, the workload management plugin did not connect to a server.
When the workload management plugin receives a org.omg.CORBA.COMM_FAILURE or org.omg.CORBA.NO_RESPONSE exception, the plugin code checks the return value of COMPLETE_STATUS to determine whether the client request can be redirected to another server. COMPLETE_STATUS can have any of these values:
- COMPLETED_NO The WLM plugin routes the request to another server.
- COMPLETED_YES No failover is required. The client request was successful, but a communication error was encountered. The WLM plugin does not return an error to the client application.
- COMPLETED_MAYBE The WLM plugin can not determine if the client request was completed successfully, and as a result can not redirect the client request to another clustered application server. The client application receives the exception and either tries to submit the request again or take some alternative action.
If a com.ibm.CORBA.INTERNAL with minor code: 1229066304 (0x49421040) exception is thrown, the workload management plugin is not working properly, and failover does not occur.