0 Replies Latest reply on Oct 15, 2010 4:55 AM by andrewwheeler

    Extended PC in Dependent

    andrewwheeler

      I would like to use the extended persistence context in a dependent bean that provides a framework through inheritance (like EntityHome). I consistently get an exception of:



      It is illegal to inject an EXTENDED PC into something other than a SFSB

      So something like the following causes an error


      public abstract class EntityHome<E> {
           @PersistenceContext(type = PersistenceContextType.EXTENDED)
           EntityManager entityManager;
      
      
      }
      
      



      It appears that this class is Dependent even though it is abstract. Should all abstract classes be ignored? Obviously this class cannot be declared as @Stateful. How can I tell CDI to ignore this class?


      Also, it would be extremely helpful if the exception printed the class in error.