1 Reply Latest reply on Oct 15, 2012 1:21 PM by lightguard

    @Transactional interceptor ignores derived methods

    dweil

      I would like to use @Transactional on class level of a derived class, e. g.

       

      @Transactional

      public class Derived extends Base

      {

        ...

      }

       

      I experience that only the methods of the class itself are intercepted whereas the methods inherited from the base class are called without transaction handling.

       

      The reason is the way org.jboss.seam.transaction.TransactionInterceptor looks for the annotation: If the annotation is not placed on the method itself, the class declaring the method is searched for the annotation. In case of a base class method, the class in my example is Base - which has no @Transactional annotation.

       

      So: Is this the intended behaviour? If so, it would render @Transactional much less useful: In my example above I would like to have *all* methods called transactionally, not only the methods of Derived.

       

      Thanks for any hints.

       

      Dirk