Hello,

What happens to a running thread in the EJB container when the client that
initiated the call gets terminated?

I tried it using Visual Age/J 3.0. The Client calls the EJB which in turn
starts an eternal loop. Even though I terminate the client process, the EJB
keeps running.
I wonder if this behaivior is just vendor-specific or ensured by the spec?
If I had a thread waiting like this for some event, this could possibly consume
quite a lot of time. Is there a good way to slow the thread down, like sleep
for several milliseconds or change the priority?

The reason for my questions: The EJB container doesn't allow you to create new
threads. However, in some cases it is desirable to have a second thread - for
example to implement callbacks or to have a background thread observing data
and notifing a client about changes. If it was possible to create some sort of
thread-pool in the EJB container they could wait there until a client needs to
use them.

Any ideas?

ingo.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to