Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-927

Partial beans ignore interceptor bindings from stereotypes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.4.0
    • None
    • PartialBean
    • None

    Description

      Scenario

      Given a transactional repository

      @Repository
      @Dependent
      @Transactional
      public abstract class CustomerDao extends AbstractEntityRepository<Customer, Long> 
      

      I'd like to reduce the number of annotations by using a stereotype.

      @Stereotype
      @Dependent
      @Transactional
      @Inherited
      @Target({ TYPE })
      @Retention(RUNTIME)
      @Documented
      public @interface Dao { }
      

      so that my repository can be simplified to

      @Repository
      @Dao
      public abstract class CustomerDao extends AbstractEntityRepository<Customer, Long> 
      

      Expected Behaviour

      The @Dao @Repository works just like the original version.

      Actual Behaviour

      There is a TransactionRequiredException when calling the save() method. The interceptor binding on the stereotype has no effect.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hwellmann Harald Wellmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: