To keep track of application i have used multithreading in servlet as need was to run program on deploying, so contextlistener is used there. Some unexpected behaviors are facing in jboss 4.0
1) when thread run, it does not stop even server stopped or net beans is close.
2) during application startup servlet run, thread working fine. but when changes done to some class and redeploy is done it does not allow to deploy again.
3) Thread is very bad