Skip to main content

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

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
Dipl.-Ing. Tors...
Offline
Joined: 2011-06-28

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?