views:

552

answers:

2

I have a legacy JBoss 4.0.4/EJB 2.1/PostgreSQL system with zillions of "transaction scripted" procedures as server EJB methods, and many of them have very slow and clumsy execution times due to bad programming practices (like creating temporary tables everytime, etc).

Is there something I can plug in JBoss (Aspect-Like) to monitor the executions of remote EJB methods, capturing start time, and end-time, for further profiling later? The idea is to optimize the most executed methods in the system as much as possible, and then investigate alternatives for a new platform.

A: 

This looks like a promising solution: http://www.jboss.org/jbossprofiler/

It's not exactly an AOP solution, but it appears it would be fairly simple to set up, and would give you the data you're looking for.

Benson
+2  A: 

JBoss publishes JSR-77 statistics for all deployed EJBs. They are accessible through JMX. See the JavaDoc for: javax.management.j2ee.statistics.EJBStats The stats will include the number of invocations and total elapsed execution time, and average execution time can be derived. The use a JMX monitor to acquire the data.

Nicholas