0 Replies Latest reply on May 29, 2008 5:28 AM by Steve Dobson


    Steve Dobson Newbie

      I'm creating a garbage collection service, you know the kind of thing I'm sure:

      public class MyEntity {

      public class GarbageCollectorService
       implements GarbageCollectorManagement {
       public void preRemove(final Object obj) {
       if (obj instanceof MyEntity)
       preRemove((MyEntity) obj);

      With the other service I've written the EntityManager was set up I assume because it got inherited with the calling of method from the session bean. But my garbage collection service is never called from a session bean, or anything else I write, so it doesn't appear to get configured.

      Is there away of annotating/getting a valid EntityManager?

      Thanks for any advice in advance.