Hi all,
I have 2 JBoss instances (3.2.3 on Windows 2003) in a cluster, and I have a client
Java application (in a separate VM) that tries a JNDI lookup. The Jndi.Properties of
the client is:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
So since provider url is not defined, it should look for the HA Jndi.
I create the initial context in the usual way:
javax.naming.InitialContext initialContext = new javax.naming.InitialContext();
when I do initialContext.lookup(), it succeeds or fails as follows:
If the 2 JBoss instances are up, the lookup succeeds.
If the 2 JBoss instances were up, and then one goes down, I am left with a single
JBoss - the lookup succeeds.
If only a single JBoss is up, the lookup fails!
The exception I get is below.
Is this behavior by design or is it a bug.
If it is by design, what is the intention of this design. I would like the client to
succeed in all cases. Why should it care that the cluster has only 1 node?
TIA
Evyatar.
javax.naming.CommunicationException: Receive timed out [Root exception is
java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1115)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1223)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at
com.ipontis.platform.events.test.RemoteEjbTest.testSimpleClusteredEjb(RemoteEjbTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive(Native Method)
at java.net.DatagramSocket.receive(DatagramSocket.java:711)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1093)
... 18 more
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845566#3845566
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845566
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user