[jboss-user] [EJB/JBoss] - How to set a RMI client timeout?
j0llyr0g3r
do-not-reply at jboss.com
Fri Jun 27 11:45:46 EDT 2008
Hey folks,
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(....)
|
- Now sometimes the methods the EJB calls take a looooong time
- That's why i want my client to terminate the connection after a certain amount of time
Now i tried to set all the timeouts mentioned in the thread above:
anonymous wrote :
|
| 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):
| sun.rmi.transport.tcp.responseTimeout (undocumented).
But these timeouts are simply ignored by my client, so i think this is a Jboss issue...
Any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161235#4161235
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161235
More information about the jboss-user
mailing list