I have created a Admin Client implementaion for Notifications for Hung Thread. I have sucessfully connect to server through Adminclient.
adminClient = AdminClientFactory.createAdminClient(connectProps);
When I use below query to fetch the MBean for Node, I am able to get the Notifications when server is started or stopped.
String query = "WebSphere:type=NodeAgent,node=" + nodeName + ",*";
But I am only looking for the Notifications related to Hung Thread, Can you please suggest what MBean i sould use for the same.
I have tried below to get the MBean.
String queryString = "WebSphere:type=ThreadPool,process="+nodeName+",name=WebContainer,*" ;
String queryString = "WebSphere:type=ThreadPool,process="+nodeName+",name=ThreadPool,*" ;
String queryString = "WebSphere:type=ThreadPool,process="+nodeName+",name=ORB.thread.pool,*" ;
But I am not getting JMX notification though I can see in SysetemOut.log Hung thread error is present.
adminClient.addNotificationListener(nodeAgent, this, null, null);
I have used above to bind the notification to the MBean.