In our application we are having few threads which will listen at certain port. Now if we make any changes to ear file and try to hot deploy, we will see previous threads still exist.
Is there any way where we can remove existing threads when doing hot deploy.
How does this relate to the JCA?
You are not supposed to create threads in normal j2ee application. You can
in a servlet which has some lifecycle callbacks.