I'm looking for simplest way to trace execution time of SQL query generated by Hibernate. Unfortunately it cannot be done in traditional way - just by setting show_sql or hibernate logger, because monitored application is multithread on production environment and sql times tracing should be done only for one service, which is mots problematic. Service means some component running within Spring application. But in my case it is safe to tell, that it is thread - thread is not changed during invocation. Service implementation is a Java method and this method calls others methods, components, etc, everything i one thread. It is possible for me to change one method source and deploy it, but I cannot release application. Unfortunately AspectJ cannot be used as is, because I cannot change whole application, recompile nor plug something into JVM. Unfortunately (next) DB administrators cannot turn on sql queries tracing - they don't know how to do it. Please help, how to tune Hibernate execution without digging the whole application? What is the simplest way?
Facts: Hibernate 3.x, Spring 2.x, java 1.5