[
https://issues.jboss.org/browse/AS7-5536?page=com.atlassian.jira.plugin.s...
]
Stuart Douglas resolved AS7-5536.
---------------------------------
Fix Version/s: 7.1.3.Final (EAP)
7.2.0.Alpha1
Resolution: Done
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: EE, Web
Affects Versions: 7.2.0.Alpha1
Reporter: Cheng Fang
Assignee: Stuart Douglas
Fix For: 7.1.3.Final (EAP), 7.2.0.Alpha1
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