Try OpenEdge Now
skip to main content
Messaging and ESB
Implementing Messaging : Error and condition handling : Connection and communication failures
 

Connection and communication failures

The most common run-time error condition is a connection failure. The beginSessionprocedure , which creates the connection to the OpenEdge Adapter for SonicMQ and the JMS server, reports connection failures synchronously by calling:
RETURN ERROR <error-message>.
The error can result from a failure to connect either to the OpenEdge Adapter for SonicMQ or to the JMS server. If the connection to the JMS server fails, the format of the error message is:
<java-exception>:<error-message>.
A communication failure that occurs after a successful connection might be detected:
*Synchronously (for example, when the application is trying to publish a message)
*Asynchronously through the error handler
It might take several minutes for the timeout mechanism to trigger a communication failure event. To detect potential communication failures more quickly, use the setPingIntervalprocedure (a SonicMQ extension) to instruct the OpenEdge Adapter for SonicMQ to actively ping the SonicMQ Broker every n seconds.