I have a servlet that uses JGroups JChannel. When this servlet is to be taken out of Tomcat, e.g. when shutting down Tomcat, those JGroups threads persist and cause Tomcat to hang. Is there a way to stop the JGroups threads in servlet upon shutdown?
Knowing that most of the containers does not tolerate threads started by the components, such as EJB or servlet, should EJB or servlet use JGroups directly?
Here is the stack configuration...
<VERIFY_SUSPECT timeout="1500" />
<UNICAST timeout="5000" />
You should call Channel.close() in this case
The JChannel.close() was called. It is the Promise.doWait() that hangs the Tomcat shutdown. Promise.doWait() is called because the JChannel.disconnect() is invoked, which itself is called by the JChannel.close().
It appears that Promise.doWait() waits forever until some thing else to wake it up. But nothing comes to wake it up. Do you know what is supposed to come to wake up the Promise.doWait()?
The Channel.disconnect() should get a DISCONNECT_OK from the transport, which causes it to terminate the wait. What is your stack configuration ?
Did you ever figure this one out?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.