aspose file tools*
The moose likes Websphere and the fly likes WebSphere Performance Monitoring Infrastructure - Active Method Count Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "WebSphere Performance Monitoring Infrastructure - Active Method Count" Watch "WebSphere Performance Monitoring Infrastructure - Active Method Count" New topic
Author

WebSphere Performance Monitoring Infrastructure - Active Method Count

Jane Barnett
Greenhorn

Joined: Oct 12, 2009
Posts: 5
I am working on a web application to be deployed on WAS 6.1. I am using stateless session beans with container managed transactions (CMT).

Using the Performance Monitoring Infrastructure, within WAS 6.1, I have realized that for a particular bean, the metric - ActiveMethodCount is directly proportional to the number of transactions marked for roll back. Transactions are marked for roll back when any exception is thrown within the business bean method. So if I throw 10 business exception and call setRollBackOnly 10 times, At the end of those 10 method calls, the ActiveMethodCount is 10, suggesting that I have 10 methods running concurrently. How can this be? The method has returned to it caller.

Additionally, when I use the RAD profiling tool, I see that the 10 business exceptions created during the execution of the business exception are still being referenced, preventing garbage collection, resulting in a memory leak.

The code looks like this:
Bean 1 call Bean 2: Bean 1 has a txn attribute of NEVER whilst Bean 2 has txn attribute REQUIRED

Bean1 - NEVER
public void testJob(){
for(int x = 1; x<=20; x++){
Bean2Service.testMethod(new Integer(x));
}
}

Bean2 - REQUIRED
public void testMethod(Integer x){
try{
if(x.intValue() > 10){
throw new LMSBusinessException("Bus Exp");
}
log.debug("Committing for - "+x);
}catch(Exception e){
log.debug("Rolling back for - "+x);
getSessionContext().setRollbackOnly();
}
}

Help....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WebSphere Performance Monitoring Infrastructure - Active Method Count