The SessionProfiler (http://wiki.eclipse.org/EclipseLink/Examples/JPA/Monitoring) looks quite interesting. In order for us to keep tabs on our use case performance it would be helpful if we could group the statistics on a per use-case (= 1 transaction) basis. So basically I would like to get statistics on all queries and fetches (both cache and database) from the beginning of the transaction until it ends.

Can the session profiler be used / adapted in this way or should i look at other ways of doing this ?