But it seems like the timeout settings are ignored, I catch the following exception:

65746 ERROR org.jboss.remoting.transport.socket.SocketClientInvoker - Got marshalling exception, exiting
java.net.SocketTimeoutException: Read timed out
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:235)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2200)
at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2490)
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2500)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1267)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:72)
at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:244)
at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:117)
at org.jboss.remoting.Client.invoke(Client.java:201)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:41)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:40)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
at org.jboss.aspects.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:34)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:79)
at $Proxy0.findAll(Unknown Source)
at ...

I got a stateless bean and I am testing it with concurrency, but when the method that I am calling lasts more than 60 seconds, i always get the following error in the client, and the server processes all without error.

java.lang.reflect.UndeclaredThrowableException at $Proxy0.doWorkitem(Unknown Source) at com.vision.bizagi.wfes.testClient.MainClass.testWFMan(MainClass.java:143) at com.vision.bizagi.wfes.testClient.MainClass.run(MainClass.java:86) at java.lang.Thread.run(Thread.java:595)Caused by: java.rmi.ConnectException: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is: java.net.SocketTimeoutException: Read timed out at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:266) at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:117) at org.jboss.remoting.Client.invoke(Client.java:201) at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:41) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88) at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:60) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88) at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:46) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88) at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:40) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88) at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:41) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88) at org.jboss.ejb3.stateless.StatelessClusteredProxy.invoke(StatelessClusteredProxy.java:85) ... 4 moreCaused by: java.net.SocketTimeoutException: Read timed out 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:235) at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2200) at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2490) at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2500) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1267) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:72) at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:244) ... 17 more

Then I put a Thread.sleep(60000) in the method that I am calling, and with a single client I always get the error.

I've tried to modify the jndi properties for the client using a TimedSocketFactory and setting a long timeout and no timeout and still no working, after that I've found this post and tried to modify the socketTimeout from the server in the ejb3.deployer/META-INF/jboss-service.xml, and no matter how many milliseconds I set in the attribute, I always get the same error.

I did the same in my jboss-service.xml file (I'm using jboss 4.0.5GA ) over Linux.At first - I tested with a value of 1 second, and it did work (got timeout after 1 second).Then, I changed the value to 7200 seconds (2 hours) but I got the SocketTimeout exception with a value of 1800 seconds.

Hi all, first of all, turns out that my experiment with 1000 miliseconds did not work (the exception I got came due to another reason).

I looked inside the code of JBoss-Remoting 1.4.4 and found out that in SocketClientInvoker.java

the constant SO_TIMEOUT_FLAG is now defined as:

public static final String SO_TIMEOUT_FLAG = "timeout";

so the parameter that should be used as written in previous posts at this thread is not "socketTimeout" but "timeout" (in JBOSS 4.0.5)I tested this on windows XP with setting the value to 5 seconds and it worked.