0

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.

Siva Ram
  • 21
  • 1
  • 8

1 Answers1

2

The Server MBean produces hung thread events TYPE_THREAD_MONITOR_THREAD_HUNG and TYPE_THREAD_MONITOR_THREAD_CLEAR. Modify the MBean query to "WebSphere:type=Server,*", and then add a notification listener for each server for which the client will handle hung thread events. The client should now be enabled to handle notifications for hung thread events.

Dave Zavala
  • 171
  • 3