31.4.4. Time outs and the JMS bridge
There is a possibility that the target or source server will not be available at some point in time. If this occurs then the bridge will try
Max Retries
to reconnect every Failure Retry Interval
milliseconds as specified in the JMS Bridge definition.
However since a third party JNDI is used, in this case the JBoss naming server, it is possible for the JNDI lookup to hang if the network were to disappear during the JNDI lookup. To stop this occurring the JNDI definition can be configured to time out if this occurs. To do this set the
jnp.timeout
and the jnp.sotimeout
on the Initial Context definition. The first sets the connection timeout for the initial connection and the second the read timeout for the socket.
Note
Once the initial JNDI connection has succeeded all calls are made using Remote Method Invocation (RMI). If you want to control the timeouts for the RMI connections then this can be done via system properties. JBoss uses Oracle's RMI and the properties can be found here. The default connection timeout is 10 seconds and the default read timeout is 18 seconds.
If you implement your own factories for looking up JMS resources then you will have to bear in mind timeout issues.