In a Seam 2.x app, how can I observe/intercept the following events (whether or not they are raised by Seam and/or Hibernate)?
1) EntityManager (Session) is closed
2) EntityManagerFactory (SessionFactory) is closed
assume that we are using Hibernate as our persistence provider.
I want to perform an action/operation when one of the above events occur. How to implement this? thx.