Anybody pls help me on how to write a java script for the concept " detection of hung threads" in webMethods Integration servers. I am in a plan to place and run the java script in all our servers inorder to detect hung threads.
Idea: To detect hung threads in IS server.
Parameters: 1) To count number of hung threads found in server suppose by giving some limit to threshold value.
2) To take threaddump
3) To delete the threads and restart the IS automatically
Please provide me any sample java script if you have implemented any such.
Code snipped posted in the above link will not work all the time as expected (in my experience). However you cant write the java script directly, first you have define some API (webMethods flow services) to actually invoke them via UI. The UI code can be on js,ajax,html etc
As per my knowledge starting from wM 8.2 IS and above you have an option to check the currently running services for a longer time (threads) and you can either cancel the thread or kill a thread if you are sure that it must. I would like to suggest you to check the actual flow/java services being called on the back end. In this way you will be able to get the current thread and you can accomplish your job. You can also generate thread dump from WmRoot services, even restart of IS can be achieved. Moreover you may also explore command central if provides any out-of-the-box feature to handle such requirements as I have not fully explored CC.
I used the same java code a few months back on wM 8 version, it worked for me. So I suggested to have a look, it’s upto the requestor to make use of or not based on fitting critieria
MR,
Its just my point of opinion (as I experienced it in the past) and wanted to share here. And of course its up to the requester to make use of it or not. Moreover I never made a statement that it will not work at all