Reputation:
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...
Upvotes: 3
Views: 2702
Reputation: 2342
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.
Upvotes: 2