tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Problem with session activation after restart
Date Thu, 15 Nov 2007 19:09:02 GMT
Hash: SHA1


Jacek Olszak wrote:
> The problem is that the method
> HttpSessionActivationListener.sessionDidActivate() is called before 
> any context listeners. I have a ContextLoaderListener configured in
> my web.xml which creates the Spring context.

Do you mean a ServletContextListener?

> I want my session beans have access to this context, but they are
> activated before the context is done. Is there a way to change this
> behavior?

Section 10.3.4 of the servlet spec says that, during shutdown, session
listeners are notified before context listeners, so I would imagine that
the opposite is true for startup (although the 2.4 spec doesn't
explicitly state that AFAICT).

Looking at StandardContext in the TC 6.0 sources, I don't see any
mention of HttpSessionActivationListener, so I think those are ignored
during startup (and shutdown). Only when the session manager starts (or
stops) should you see notifications to your session listeners.

Can you provide evidence to support your claim? Do you have log
statements in your ServletContextListener and your
HttpSessionActivationListener with timestamps that support your claim?
If so, please post them so we can take a look at them.

- -chris
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message