Hi All.
I am currently working on an multitreaded axis service. From my interface class
I invoke a thread that processes the request. The thread is executed in the the
thread pool obtained from the Root Context of the service.The thread starts OK,
but if it is suspended in a wait() it is immediately interrupted. Do anyone
know why this may happen?
I can see that there is a threadKeepAliveTime configurable in the axis2.xml,
but the default interval seems to be long enough (180s).
Below are some snippets of code for illustration:
The execution of the thread in the interface class:
CmsThread cmsThread = new CmsThread();
ThreadFactory threadFactory =
MessageContext.getCurrentMessageContext().getRootContext().getThreadPool();
threadFactory.execute(cmsThread);
The run method of the cmsThread class:
public void run()
{
try{
logger.info("waiting...");
wait(10000);
logger.info("end");
}
catch (Exception e)
{
logger.info("interrupted");
}
}
Thanks for any input
Jørund Lie