6 Replies Latest reply on Jun 28, 2012 4:38 AM by Klaus Benary

    Annotation inheritance on AS 7

    Klaus Benary Newbie



      when migrating an EJB3 application from JBoss5 to JBoss7 we found the following issue:


      We use an abstract superclass for our SessionBeans. It implements concrete @PostConstruct and  @PreDestroy methods which in turn call proteted abstract methods. The latter are implemented in subclasses (SessionBeans). If the abstract superclass lies in the  application jar together with the SessionBean the inheritance works and the annotations are effective. However, when we put the abstract superclass in a module jar, the superclass is still visible (i.e. the SessionBeans can be loaded), but the annotations are no longer in effect: @PostConstruct and  @PreDestroy methods are not called amy more.


      Does this mean, that on JBoss7 annotation inheritance works somehow different than ist used to in JBoss5/6?