3

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...

4

1 回答 1

2

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.

于 2008-11-05T18:00:45.487 回答