I'm trying to write some code to evaluate query performance in my ejb3 code. I was wondering if there was some way to get the actual time that it takes jboss to load/store /update stuff in the database. Doint this following will NOT work:
long t1 = System.currentTimeMillis(); em.merge(myEJB); long updateTime = System.currentTimeMillis() - t1;
You can hook into the Hibernate Entity Event Listeners and do a compare of times the Pre- and Post Events are fired...