I'm trying to access a remote ejb which is not available yet. But the lookup takes 5 min before I get the NameNotFoundException. Is there a way I can set the lookup timeout to a lesser value so that the client application doesn't hang for 5 mins? Thanks in advance...
+1
A:
Do the lookup in another thread, so that the client GUI does not hang. You can use plain Runnable to do this, or try a better option like swingworker.
To customize the JNDI lookup timeout, I am afraid, you will have to hack the internals of an open source app server, if that is an option.
swapnonil
2008-11-05 18:00:45
Thanks a lot Swapnonil. I'm using jboss so I was able to specify lookup timeouts in there. That worked :)
2008-11-11 15:53:53
A:
Do the lookup in another thread, so that the client GUI does not hang. You can use plain Runnable to do this, or try a better option like swingworker.
That's exactly what we are doing. But this brings another problem: It seems that it is not possible to lookup a EJB on another server as long as the erroneous lookup is hanging.
Is there any way to avoid this and get further lookups working?
dmt
2010-06-02 14:54:15