Bug 45869

Summary: DefaultAnnotationProcessor does not scan class hierarchy for @PostConstruct and @PreDestroy annotations
Product: Tomcat 6 Reporter: Firstname Lastname <removeps-code>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P2    
Version: 6.0.14   
Target Milestone: default   
Hardware: PC   
OS: Windows XP   

Description Firstname Lastname 2008-09-23 17:50:07 UTC
DefaultAnnotationProcessor does not scan class hierarchy for @PostConstruct and @PreDestroy annotations.

The @PostConstruct function is not called for a managed bean when the function
is defined in the base class.

Detail:

In the base class BaseClass I have a function

@PostConstruct
public void BaseClass.init();

My bean class OuterBean is derived from BaseClass, so it inherits this init
function and hopefully the @PostConstruct annotation.

In the old version of JSF, namely 1.2-b20-FCS from April/21/2006, the init()
function was called. But in the new version of JSF, which is JSF 1.2.9 from
July/17/2008, init() is not called.

I wrote a bug against JSF, and they said that I should write a bug against Tomcat 6, and mention the DefaultAnnotationProcessor.  So this is the bug.

The URL of my JSF bug is

https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=800
Comment 1 Mark Thomas 2008-09-24 05:18:40 UTC

*** This bug has been marked as a duplicate of bug 45285 ***