dev@glassfish.java.net

workaround for issue GLASSFISH-11254 doesn't work for me

From: Dipl.-Ing. Torsten Liermann <lier_at_liermann-it.de>
Date: Thu, 29 Sep 2011 18:07:04 +0200

Hi,

Can't send JMS messages to a remote glassfish 3.1.1.
 
I have configured my glassfish like Nigel Deakin describedit here http://java.net/jira/browse/GLASSFISH-11254 on 02/Sep/11.

JMS Type: EMBEDDED
Default_JMS_HOST: localhost

When getting the TopicConnectionFactory the address list contains
mq://localhost:7676 and not the expected ip address of the glassfish
server instance.

   topicConnectionfactory.createTopicConnection()

throws the exception

com.sun.messaging.jms.JMSException: [C4003]: Error occurred on connection creation [localhost:7676]. - cause: java.net.ConnectException: Connection refused: connect

=====================================================
When I change the JMS Type to LOCAL and the Default_JMS_HOST to 0.0.0.0
the addresslist contains mq://0.0.0.0. and I get the error

com.sun.messaging.jms.JMSException: [C4003]: Error occurred on connection creation [0.0.0.0:7676]. - cause: java.net.ConnectException: Connection refused: connect

When I change the default_JMS_Host to the ip address of the server machine it works.

But I need a solution that works without specifying the ip address.

Is there a solution for that?