glassfish_at_javadesktop.org wrote:
>One of the nits of JEE is that there isn't any standard place to really hook in to the EJB side to perform one time startup. There's the Servlet life cycle methods that can be used, however.
>
>But there's the rub.
>
>If I have a 2 WARs in an EAR, sharing some EJBs, how does the lifecycle work?
>
>Specifically, which WAR gets their ServletContextListener first?
>
The order in which the listeners are invoked is undefined.
This is true even for the possibly many listeners declared within the
same web.xml.
The Servlet EG is looking into making it possible to manage the order in
which
the listeners declared in the same web.xml are to be invoked, but this
would still
leave undefined the order in which the WARs of an EAR are initialized.
This is
probably something that would need to be raised with the Java EE EG.
> Are all of the ServletContextListeners called before any of the WARs can start accepting requests?
>
>
The spec guarantees that all of a webapp's ServletContextListeners will
have been
invoked before the webapp will process any requests, but it makes no such
guarantee for the combined ServletContextListeners of the WARs inside an
EAR.
Jan
>And if I have an expired EJBTimer or a message in a JMS Queue with an MDB attached, are they called after the ServletContextListeners, or can they be executing before the SCLs are started or finished?
>
>(Doesn't EJB 3.1 give us a singleton bean? I can hardly wait!)
>[Message sent by forum member 'whartung' (whartung)]
>
>http://forums.java.net/jive/thread.jspa?messageID=222258
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>