i am having a hard time trying to figure out to set the client timeout for an RMI-client connected to a Stateless Session Bean.
First i thought that this was not a Jboss specific question, but a RMI issue, that's why i asked here first: http://forum.java.sun.com/thread.jspa?threadID=5300931
In the course of the thread above it turned out to be a Jboss issue (at least thats what i think...), since my client uses Jboss RMI libraries.
Let me clarify the situation:
- I have a RMI-client
- This client connects to a Stateless Session Bean running within a Jboss 4.2.2 like this:
Hashtable<String, String> props = new Hashtable<String, String>(); props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.security.jndi.JndiLoginInitialContextFactory"); props.put(Context.PROVIDER_URL, ....); props.put(Context.SECURITY_PRINCIPAL, ....); props.put(Context.SECURITY_CREDENTIALS, ....); Context ctx = new InitialContext(props); .... = ctx.lookup(....)
RMI client Connect timeout:
-Dsun.rmi.transport.proxy.connectTimeout=timeout. See http://java.sun.com/j2se/1.5.0/docs/guide/rmi/sunrmiproperties.html
RMI client Handshake timeout:
sun.rmi.transport.tcp.handshakeTimeout (see ditto).
RMI client read timeout (for the response):