[jboss-jira] [JBoss JIRA] (AS7-5536) servlet lifecycle interceptor methods ignored when declared in web.xml

Remy Maucherat (JIRA) jira-events at lists.jboss.org
Wed Sep 12 11:23:32 EDT 2012


    [ https://issues.jboss.org/browse/AS7-5536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12717960#comment-12717960 ] 

Remy Maucherat commented on AS7-5536:
-------------------------------------

If anything deals with EE specification functionality, it should be categorized in the EE module.
                
> servlet lifecycle interceptor methods ignored when declared in web.xml
> ----------------------------------------------------------------------
>
>                 Key: AS7-5536
>                 URL: https://issues.jboss.org/browse/AS7-5536
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Web
>    Affects Versions: 7.2.0.Alpha1
>            Reporter: Cheng Fang
>            Assignee: Remy Maucherat
>
> web.xml declares post-construct and pre-destroy methods, but are not invoked during the servlet lifecycle.
> {code:xml}
>   <post-construct>
>     <lifecycle-callback-class>test.TestServlet</lifecycle-callback-class>
>     <lifecycle-callback-method>ps</lifecycle-callback-method>
>   </post-construct>
>   <pre-destroy>
>     <lifecycle-callback-class>test.TestServlet</lifecycle-callback-class>
>     <lifecycle-callback-method>pd</lifecycle-callback-method>
>   </pre-destroy>
> {code}
> The servlet class itself does not contain any @PostConstruct or @PreDestroy methods.
> {code:java}
>     private void ps() {
>         System.out.println("in post-construct declared in web.xml of " + this);
>     }
>     private void pd() {
>         System.out.println("in pre-destroy declared in web.xml of " + this);
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list