cancel
Showing results for 
Search instead for 
Did you mean: 

How to kill a single Java thread ID?

Former Member
0 Kudos

All

How to kill a single Java thread ID without recycling the entire Java process, via SMICM or jcmon?

Kindly let me know if there any method followed for the same.

Regards

Jim

View Entire Topic
iavor_petkov
Explorer
0 Kudos

Hi,

There is no way to stop a thread gracefully in Java.

Check the javadoc of http://docs.oracle.com/javase/6/docs/api/java/lang/Thread.html#stop() - it is similar also in earlier releases of Java.

Correspondingly there are no tools, commands or UI in the Java server which allow or try to do this.

The startservice/stopservice commands try to stop and start Java AS services (and you cannot stop core services).

The stopapp/startapp commands will try to stop and start Java EE applications deployed on the Engine but will not stop any threads which are currently executing in those applications. This will especially not help you if due to faulty coding the application has fallen into an infinite loop or deadlock.

Best Regards,

Iavor