How to set timeout during remote ejb search?

I am trying to access remote ejb which is not yet available. But the search takes 5 minutes before I get a NameNotFoundException. Is there a way to set the search timeout to a lower value so that the client application does not freeze for 5 minutes? Thanks in advance...

+3
source share
2 answers

Do a search in another thread so that the client GUI does not hang. You can use the simple Runnable for this or try a more efficient option like swingworker .

To set up a JNDI search timeout, I'm afraid you will have to hack the open source application server internals if this is an option.

+2

, GUI . Runnable , swingworker.

, . : , EJB , .

?

0

Source: https://habr.com/ru/post/1699167/


All Articles