Java EE 6 - ordering Servlet Request Listeners

Posted by Walter White on Stack Overflow See other posts from Stack Overflow or by Walter White
Published on 2010-04-26T02:50:12Z Indexed on 2010/04/26 2:53 UTC
Read the original article Hit count: 454

Filed under:
|
|

Hi all,

I finally updated to Java EE 6 (web profile) and would like to control the ordering of my servlet request listeners. I did that before through the XML ordering by listing the listeners in a particular order. Now, I have placed the @WebListener annotation on the classes which are listeners and am trying to figure out how to order the listeners such that they work properly. One must run before another one, otherwise, it won't have the information it needs and won't work.

Also, it doesn't seem my listeners are actually being invoked even though they're marked with @WebListener. I am running embedded glassfish 3.0.

Another question that is somewhat related - ServletRequestListeners in Java EE 6 by default are still synchronous meaning they're hit first, then servlet filters, right? ServletRequestListeners are not asynchronous where they merely get notified of an event without interrupting the execution?

Walter

© Stack Overflow or respective owner

Related posts about glassfishv3

Related posts about listener