1 Reply Latest reply on Nov 25, 2005 5:10 AM by Emmanuel Bernard

    Muti EntityListener

    HeonKyu Park Newbie

       

      
      @EntityListener(Listener1.class)
      public interface AA{}
      
      @EntityListener(Listener2.class)
      public interface BB{}
      
      @Entity(access = AccessType.FIELD)
      public class MyEntity extends Resource implements AA, BB{
       ....
      }
      
      public class Listener1{
       @PrePersist
       public void foo1(Element e){System.out.println("Invoke L1");}
      }
      
      public class Listener2{
       @PrePersist
       public void foo2(Element e){System.out.println("Invoke L2");}
      }
      
      


      I expected to be invoked foo1 and foo2.

      but, Only foo1 is invoked.

      How to invoke two(or more) EntityListener Method.