1 Reply Latest reply on Feb 8, 2012 3:31 AM by freeliuade freeliuade

    ejb client stick if server network down

    freeliuade freeliuade Newbie

      Hi,

         An ejb call negative case, disable the server machine's network when server side processing a ejb call, now the client will be sticked, even I enable the server network afterwards.

       

      I have tried set following properties in InitialContext properties, but it not works

      pros.put("jnp.sotimeout", "30000");

      pros.put("jnp.timeout", "30000");

      pros.put("timeout", "30000");

       

      Is there any configuration to let client can detect server side if out of connection, then throws a exception? or any way to set a timeout in client side.

       

      -------------------------------------------------------------

      the client side call stack

       

      "main" prio=6 tid=0x00847800 nid=0x449c runnable [0x0091f000]
         java.lang.Thread.State: RUNNABLE
              at java.net.SocketInputStream.socketRead0(Native Method)
              at java.net.SocketInputStream.read(SocketInputStream.java:129)
              at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
              at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
              - locked <0x02afb570> (a java.io.BufferedInputStream)
              at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2249)
              at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:242
      9)
              at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2499)
              at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2571)
              at java.io.ObjectInputStream.read(ObjectInputStream.java:820)
              at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.readVersion(MicroSocketClientInvoker.java:1000)
              at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:574)
              at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
              at org.jboss.remoting.Client.invoke(Client.java:1634)
              at org.jboss.remoting.Client.invoke(Client.java:548)
              at org.jboss.invocation.unified.interfaces.UnifiedInvokerHAProxy.invoke(UnifiedInvokerHAProxy.java:188)
              at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
              at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
              at org.jboss.proxy.ejb.RetryInterceptor.invoke(RetryInterceptor.java:176)
              at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
              at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
              at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
              at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
              at $Proxy2.getDomainInfo(Unknown Source)
              at com.qilin.EJBLookupTest.lookupEJB(EJBLookupTest.java:78)
              at com.qilin.EJBLookupTest.lookup(EJBLookupTest.java:58)
              at com.qilin.EJBLookupTest.main(EJBLookupTest.java:33)