users@glassfish.java.net

JMS Connection Timeout

From: <glassfish_at_javadesktop.org>
Date: Wed, 09 Dec 2009 12:41:07 PST

Hi Guys,

I have set up a JMS Connection Factory and Topic, which I use a webservice to publish to and Message Driven Bean to listen to. That is all good. It works fine.

But I want to be able to catch errors in the configuration of the Glassfish server if any were made.

I have found that even if my Message Driven Bean is correctly configured, and the JMS server seems to be funning fine, it can still fail with a little strange error.

If the \domains\<domain>\config\domain.xml file isn't correctly set up, the listener cannot connect. The error I have found to occur most often is in the domains.xml file in the node:

[b]/domain/configs/jms-service/jms-host/_at_host[/b]

If the attribute host is a host name that cannot be translated into an IP address by the computer where the message driven bean resides then the initialization of the bean fails with a timeout. This is correct behavior, and I want that to happen... the problem is just that this timeout is 4 minutes! I don't know exactly why this is. Maybe because the address defined in the bean is correct and I receive an answer straight away so it thinks it should be able to connect again?!?

I have tried to figure out how to set this timeout period, but without any luck. Does anybody here know how to do that?

Thanks,
JB
[Message sent by forum member 'jetpoet' ]

http://forums.java.net/jive/thread.jspa?messageID=375649