users@servlet-spec.java.net

[servlet-spec users] [jsr340-experts] _at_PreDestroy for AsyncListener

From: Shing Wai Chan <shing.wai.chan_at_oracle.com>
Date: Thu, 25 Oct 2012 13:35:32 -0700

If one invoke the
     listener = asyncContext.createListener(MyListener.class);
then the method corresponding to @PostConstruct in listener will be invoked.
The question is when the method corresponding to @PreDestroy is invoked.
I propose to call the method associated to @PreDestroy when the request
is recycled.
In this case, the user should not / cannot store the listener across the
request.

Shing Wai Chan