Hello Achim,

I have been playing with Pax Web in two environments.

(1) Eclipse Indigo/Equinox 3.7/Pax Web 1.1.1

(2) Karaf 2.2.3/Equinox 3.6.2/Pax Web 1.0.6

As part of my servlet, I have a ServletContextListener where I put
some parameters into the
servlet context in contextInitialized which I assume to be available
by the time Servlet.init is called.

When I run in environment (1), it appears that contextInitialized is
always run before Servlet.init.
When I run in environment (2), sometimes contextInitialized comes
first and sometimes Servlet.init
comes first.

I looked up the Servlet 2.5 specification and I see the following
explanation under contextInitialized:

void contextInitialized(ServletContextEvent sce)

    Notification that the web application initialization process is
starting. All ServletContextListeners are notified of context
initialization before any filter or servlet in the web application is
initialized.

which suggests to me contextInitialized should be called before Servlet.init.

So my question is:

(1) Is my interpretation of the Servlet specification correct?
(2) If yes, did something change between Pax Web 1.0.6 and Pax 1.1.1
which fixed this issue...or may
have changed threading behaviour? I did check JIRA (and the mailing
lists) and I did not see anything obvious :).

thanks in advance,
Gareth

_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to