dev@glassfish.java.net

Re: Sending JMS messages between systems doesn't work any more

From: Nigel Deakin <Nigel.Deakin_at_Sun.COM>
Date: Thu, 03 Dec 2009 11:20:47 +0000

Kim,

Kim Haase wrote:
> JMS applications that send messages from one system to another stopped
> working for me in b73 and also fail in b74. They worked in earlier
> builds -- I think I last tested them around b69.
>
> Several examples in the Java EE Tutorial are based on sending JMS
> messages between systems, so this is an issue for docs.
>
> For a number of releases, the way to enable the sending of messages to a
> remote system has been to create a JMS connection factory resource whose
> AddressList property is set to the name of the remote system. (The
> connector connection pool, therefore, has its AddressList property set
> to this value.)
>
> Now, when I try to send messages to the remote system, I get the
> following error over and over:
>
> WARNING: [C4003]: Error occurred on connection creation [jdench:7676]. -
> cause: java.net.ConnectException: Connection refused: connect
> Dec 2, 2009 11:31:55 AM com.sun.messaging.jmq.jmsclient.ExceptionHandler
> throwConnectionException

This means it is trying to connect to a MQ broker running on machine jdench on port 7676, and it is getting no response,
perhaps because the broker isn't running or it is using a different port.

Can you connect to it using other tools on your windows machine, such as imqcmd (which is in the mq/bin directory of a
Glassfish V3 installation)?

For example this command lists the destinations on the broker:
imqcmd list dst -b jdench:7676
(it will prompt for user and password: typically admin/admin)

Nigel

>
> The JMS service is running on jdench.
>
> This probably has nothing to do with it, but I also notice that when JMS
> started up on the system named jdench, it reported that its connection
> URL had the :mq: prefix:
>
> [#|2009-12-02T11:27:54.660-0500|INFO|glassfishv3.0|com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter|_ThreadID=28;_ThreadName=p:
> thread-pool-1; w: 5;|JMS Service Connection URL is :mq://localhost:7676/|#]

When the MQ broker (the JMS service) starts, you will see this message:

MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting: DIRECT (or LOCAL).

Note that in Glassfish 3 the broker isn't started when the Glassfish server starts, but is started lazily, so you may
not see this message until when the first client (either your own app or imqcmd) tries to connect to it.

>
> Or do I have to do something explicit now to allow other systems to
> connect to the JMS running on GlassFish?
>

No...

Nigel

> I'm running the client on my Windows XP system, and the remote system
> (jdench) is my Solaris 10 system. I can ping jdench from the Windows
> system just fine. The problem happens whether I run the client from
> NetBeans or from the command line.
>
> Thanks,
> Kim Haase
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>