From do-not-reply at jboss.org Wed Jun 23 08:16:47 2010
Content-Type: multipart/mixed; boundary="===============0183946458063764771=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: hornetq-commits at lists.jboss.org
Subject: [hornetq-commits] JBoss hornetq SVN: r9355 - in trunk:
examples/javaee/jms-bridge/server and 1 other directories.
Date: Wed, 23 Jun 2010 08:16:47 -0400
Message-ID: <201006231216.o5NCGl0n014202@svn01.web.mwc.hst.phx2.redhat.com>
--===============0183946458063764771==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ataylor
Date: 2010-06-23 08:16:46 -0400 (Wed, 23 Jun 2010)
New Revision: 9355
Modified:
trunk/docs/user-manual/en/jms-bridge.xml
trunk/examples/javaee/jms-bridge/server/jms-bridge-jboss-beans.xml
trunk/examples/jms/jms-bridge/server1/hornetq-beans.xml
Log:
HORNETQ-393 - add timeout code around JNDI lookup in JMSBridgeImpl to deal =
with network outages
Modified: trunk/docs/user-manual/en/jms-bridge.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/docs/user-manual/en/jms-bridge.xml 2010-06-22 20:09:07 UTC (rev 9=
354)
+++ trunk/docs/user-manual/en/jms-bridge.xml 2010-06-23 12:16:46 UTC (rev 9=
355)
@@ -172,6 +172,14 @@
<key>java.naming.factory.url.pkgs</key>
<value>org.jboss.naming:org.jnp.interfaces"</value>
</entry>
+ <entry>
+ <key>jnp.timeout</key>
+ <value>5000</value>
+ </entry>
+ <entry>
+ <key>jnp.sotimeout</key>
+ <value>5000</value>
+ </entry>
</map>
</constructor>
</bean>
@@ -403,6 +411,25 @@
your specific application.
+
+ Time outs and the JMS bridge
+ There is a possibility that the target or source serve=
r 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 sp=
ecified 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 occuring 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 Con=
text definition. The first sets the connection
+ timeout for the initial connection and the second the read t=
imeout for the socket.
+
+ Once the initial JNDI connection has succeeded all =
calls are made using RMI. If you want to control
+ the timeouts for the RMI connections then this can be =
done via system properties. JBoss uses Sun's RMI
+ and the properties can be found here.
+ The default connection timeout is 10 seconds and the defa=
ult 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.
+
Examples
Please see which shows how to configure
Modified: trunk/examples/javaee/jms-bridge/server/jms-bridge-jboss-beans.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/examples/javaee/jms-bridge/server/jms-bridge-jboss-beans.xml 2010=
-06-22 20:09:07 UTC (rev 9354)
+++ trunk/examples/javaee/jms-bridge/server/jms-bridge-jboss-beans.xml 2010=
-06-23 12:16:46 UTC (rev 9355)
@@ -119,6 +119,14 @@
java.naming.factory.url.pkgs
org.jboss.naming:org.jnp.interfaces"
+
+ jnp.timeout
+ 5000
+
+
+ jnp.sotimeout
+ 5000
+
Modified: trunk/examples/jms/jms-bridge/server1/hornetq-beans.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/examples/jms/jms-bridge/server1/hornetq-beans.xml 2010-06-22 20:0=
9:07 UTC (rev 9354)
+++ trunk/examples/jms/jms-bridge/server1/hornetq-beans.xml 2010-06-23 12:1=
6:46 UTC (rev 9355)
@@ -186,6 +186,14 @@
java.naming.factory.url.pkgs
org.jboss.naming:org.jnp.interfaces"
+
+ jnp.timeout
+ 5000
+
+
+ jnp.sotimeout
+ 5000
+
@@ -211,6 +219,14 @@
java.naming.factory.url.pkgs
org.jboss.naming:org.jnp.interfaces"
+
+ jnp.timeout
+ 5000
+
+
+ jnp.sotimeout
+ 5000
+
--===============0183946458063764771==--