Consultor Eletrônico



Kbase 21754: SonicMQ: ActiveX Not Giving Errors if Broker is Unavailable
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/7/2002
SUMMARY:

This Solution applies to SonicMQ Version 4 on Windows platforms.
It discusses why an ActiveX client might not return errors when attempting to connect to a SonicMQ 4 Broker which isn't running.

EXPLANATION:

Below is an extract of the Chat example (provided by SonicMQ) attempting to connect to the SonicMQ Broker. The complete example can be found in the "%SONICMQ%\samples\ActiveX\Chat" directory.

------------------- Begin example --------------
...
Dim connectresult As String

connectresult = ProgressJMS.jms_CreateQueueConnection(username, password)
If (connectresult < 0) Then
TConnectStatus.Text = "NO"
failmsg = "jms_CreateQueueConnection_withDefaultUser failed"
GoTo ErrorHandler
Else: TConnectStatus.Text = "OK"
End If

...

--------------- End of the example ------------

When using JRE 1.3.0 and earlier, it appears that even if the SonicMQ Broker is not running, the variable "connectresult" above will always return 0 (zero). This means that ErrorHandler within the condition block will never be reached.

SOLUTION:

Install JRE 1.3.1_02 or later to solve the problem.

Replacing the version of JRE when using SonicMQ ActiveX can be done via the following steps:

1) Uninstall the SonicMQ ActiveX Client using Control Panel >
Add/Remove Programs

2) Uninstall the current version of JRE that you wish to remove using
Control Panel > Add/Remove Programs

3) Install the new version of JRE

4) Reboot the machine

5) Install the SonicMQ ActiveX Client