I have a logging bean where I log how long database calls and bean method calls take via interceptors.
I have a bean that calls two @Asynchronous methods. Those two @Asynchronous methods call the database and are intercepted.
When the logging bean logs though, it appears that the database has taken 0 ms which can't be right. When I use this logging bean and all the interceptors without @Asynchronous calls everything works fine.
I'm using glassfish 3.1.2.2. The doc http://glassfish.java.net/nonav/docs/v3/api/javax/enterprise/context/RequestScoped.html says "The request context is destroyed: after the asynchronous observer notification completes," Does that mean that my logging bean instance in the @Asynchronous method is destroyed when the method completes? What can I use to accomplish my goal?