1 Reply Latest reply on Feb 17, 2014 6:28 AM by Jozef Hartinger

    Observer method inheritance with @Specialize is broken

    Sergiy Barlabanov Newbie

      Hi,

       

      There is a problem when overriding an observer method in a @Specialize bean. The observer method is called two times. It is observed in Weld 1.1.8. This is similar to the problem reported in [WELD-904] Observer method inheritance broken - JBoss Issue Tracker.

      More concrete: if a bean specializes another bean and overrides an observer method, the observer method is than called twice. The beans (the super class and the subclass) must be in different jar files (both having beans.xml of course). If they are in the same jar file, the observer method is called only once.

      The method is called once also when @Observes annotation is removed from the overriding method in the specializing bean.

      Is this a bug?

       

      Best regards,

      Sergiy