Consultor Eletrônico



Kbase P64500: Adapter for SonicMQ: javax.jms.JMSException: java.net.ConnectException: Connection refused: no furth
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/30/2005
Status: Unverified

GOAL:

What is the meaning of the exception:
javax.jms.JMSException: java.net.ConnectException: Connection refused: no further
information: <protocol>://<host>:<port>

GOAL:

How to catch and handle the exception:
javax.jms.JMSException: java.net.ConnectException: Connection refused: no further
information: <protocol>://<host>:<port>

FACT(s) (Environment):

Progress 9.1x
OpenEdge 10.x
SonicMQ

FIX:

The 4GL-JMS implementation raises this run-time condition when a connection attempt to the SonicMQ Broker is rejected. The rejection can occur because the SonicMQ Broker or the network connectivity between the Adapter for SonicMQ and SonicMQ Broker is down or unavailable.
By default, the 4GL adapter will report this synchronous run-time condition via an alert box when the 4GL-JMS API call beginSession is invoked.
This alert box can be suppressed by calling the procedure setNoErrorDisplay in the session object.
The run-time condition can be handle with regular 4GL error handling mechanisms such as a NO-ERROR phrase or an ON ERROR block

Below is a simple 4GL example program of how to suppress and trap for this specific connection failure exception.