[EJB/JBoss] - How to set a RMI client timeout?
by j0llyr0g3r
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
17 years, 9 months
[Installation, Configuration & DEPLOYMENT] - Custom Deployer problem with RepositoryClassLoader
by alexandrem
Hi.
We have our own JAIN-SLEE Deployer, which acts as a regular deployer but performs some JMX actions and manages component dependencies. What's happening it's that when we delete a component which has dependants, the deployer does nothing but to add it to a list of "waiting to be undeployed" components. The problem is that the file has already been deleted... so, when the dependant is undeployed, we are getting this exception:
16:41:16,701 ERROR [STDERR] java.lang.NullPointerException
16:41:16,701 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:630)
16:41:16,701 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
16:41:16,701 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:474)
16:41:16,701 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
16:41:16,702 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
16:41:16,702 ERROR [STDERR] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
16:41:16,702 ERROR [STDERR] at org.mobicents.slee.services.sip.proxy.ProxySbb.onActivityEndEvent(ProxySbb.java:408)
16:41:16,702 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:41:16,702 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
16:41:16,702 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
16:41:16,702 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
16:41:16,703 ERROR [STDERR] at org.mobicents.slee.runtime.sbbentity.SbbEntity.invokeEventHandler(SbbEntity.java:879)
16:41:16,703 ERROR [STDERR] at org.mobicents.slee.runtime.EventRouterImpl.routeQueuedEvent(EventRouterImpl.java:885)
16:41:16,703 ERROR [STDERR] at org.mobicents.slee.runtime.EventRouterImpl.access$100(EventRouterImpl.java:64)
16:41:16,703 ERROR [STDERR] at org.mobicents.slee.runtime.EventRouterImpl$EventExecutor.run(EventRouterImpl.java:121)
16:41:16,703 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
16:41:16,703 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
16:41:16,703 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
This is similar to JBAS-4052 (http://jira.jboss.org/jira/browse/JBAS-4052). I think the problem resides in the dependant had been undeployed and so the classloader.
I've tried to abort the undeployment of the dependant by throwing a DeploymentException, but it didn't solved the issue.
Do you have any idea of how can I fix this? Create a temporary copy of the jar and load it from there instead? How?
Thanks,
Alexandre Mendonça
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161229#4161229
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161229
17 years, 9 months