If I have a infinitive loop inside a method of the MBean, how can I stop this method or remove the MBean after invoking this method.
I try to unregister the MBean and undeploy the MBean jar file, but the thread is still running. It looks like Jboss doesn't clean it.
JBoss only tells your MBean to stop().
The thread is under the control of your MBean,
you'll have to add code to interrupt the thread.