About Me

About Me
Working with SOA technologies , implementing solution using IBM BPM , IBM Integration Designer,IBM WODM and IBM DataPower

About me

View Mahesh Dondeti's profile on LinkedIn

upcoming posts on IBM Bluemix,Devops,Worklight,Node js.

Tuesday, 15 January 2013

How to use PMI metrics to Monitor the WebSphere J2C adapter polling thread in a WebSphere Process Server environment

This Post provides various ways to monitor the polling thread of a WebSphere adapter in a WebSphere Process Server environment.
Step1-
Create two Modules with Flat file inbound adapter which picks file have extension .txt1,.txt2 and print data on console .
MM_FF_Test1:-There is one SCA flat file adapter export that is configured to poll the folder C:\Users\miracle\Desktop\flatfiletest\event for file names that have an extension of ".txt1".
In endpoint configuration of adapter give adapter id =”Test1FFA” in resource adapter as shown in below figure1
Step2:-
MM_FF_Test2:-Create another Module with Flat file inbound adapter which picks file have extension .txt2 and print data on console .
In endpoint configuration of adapter give adapter id =”Test1FFA” in resource adapter as shown in figure1.
Figure1:-

 
There is one SCA flat file adapter export that is configured to poll the folder C:\Users\miracle\Desktop\flatfiletest\event for file names that have an extension of ".txt2"

Step3:-

Deploy this modules into server .Wait until the projects are published.

When the SCA modules start, the following messages shown in Listing 1 will belogged in SystemOut.log.

Listing 1. Message endpoint activation messages:-
J2CA0523I: The Message Endpoint for ActivationSpec MM_FF_Test1/FlatFileTest1_AS (com.ibm.j2ca.flatfile.FlatFileActivationSpecWithXidWithHA) and MDB Application MM_FF_Test1App#MM_FF_Test1FlatFileTest1#MM_FF_Test1 is activated.
J2CA0523I: The Message Endpoint for ActivationSpec MM_FF_Test2/FlatFileTest2_AS (com.ibm.j2ca.flatfile.FlatFileActivationSpecWithXidWithHA) and MDB Application MM_FF_Test2App#MM_FF_Test2FlatFileTest2#MM_FF_Test2 is activated.
Note: that if the directory C:\Users\miracle\Desktop\flatfiletest\event does not exist, the message endpoint will failto be activated with an error logged to that effect.

  1. Log in to the administrative console.
  2. In the navigation table on the left, expand Monitoring and Tuning >Performance Viewer and click Current activity.
  3. Click server1. 
  4.  Expand Performance Modules > WBIStats.RootGroup > ResourceAdapter.You will notice that there are two deactivated (grayed out) entries;one for MM_FFTest1 and one for MM_FFTest2. Expand the MM_FFTest1 > InboundEventRetrieval. You will see an entry called "InboundEventRetrieval_Test1FFA". This module is for the polling thread associated with the flat file adapter export in the module FFAdapterTest1. The string "Test1FFA" is the assigned adapter ID deployed with MM_FFTest1.At this point, this entry is deactivated. You need to activate it to see that the adapter polling thread is functional. The following steps will activate this entry. As shown in figure3
  5. Click the Runtime tab.
  6. In the navigation table on the left, click Performance Monitoring Infratsructure (PMI).
  7. Select the Custom radio button and click OK. 
  8. Click server1, then the Runtime tab.Click the Custom link.
  9. Make sure the Runtime tab is in focus. Expand WBIStats.RootGroup >ResourceAdapter > com.ibm.j2c.a.resourceadapter.FFAdapterTest1 >InboundEventRetrieval. Click InboundEventRetrieval_Test1FFA
  10. Select all metrics as shown in Figure 2 and click Enable to enable the selected metrics. 
  11. Repeat the previous step for MM_FFTest2
Figure 2. Polling thread metrics:-
 

figure3: Polling thread metrics:-


The GoodRequests metric represents the number of successful polls. If this number stops increasing, it means the polling thread is not polling. In this case, the GoodRequests metrics for both polling threads are the same.

 



Other Ways for monitoring:-
When you use PMI metrics, you can monitor the adapter polling thread.Additionally, other information such as polling response time is available.

When you cannot use PMI metrics, monitoring via CBE and tracing does not provide enough information to tell which polling thread is active. This has a negative impact on performance and should only be used tactically in a production environment.

J2C message endpoint monitoring is a powerful technique to monitor the adapter polling thread and listener thread (SAP adapter case) in all adapter scenarios, where the adapter is used to consume data from EIS systems

 

No comments:

Post a Comment