|
From: <jue...@we...> - 2003-08-25 14:41:58
|
Lars, Thomas, I guess that WebLogic simply invokes the listeners after load-on-startup = servlets. Bad WebLogic ;-) Unfortunately, the Servlet 2.3 spec leaves this unspecified. The Servlet = 2.4 spec clarifies that listeners have to be *initialized before* and = *destroyed after* any servlets. Tomcat and Resin already behave this = way, Orion does too since 2.0.2 after I've informed them about the = Servlet 2.4 clarification... For a solution with current WebLogic versions, I agree that using the = servlet initializers like ContextLoaderServlet and Log4jConfigServlet is = probably the best choice, as Thomas has recommended. Juergen -----Original Message----- From: tri...@tr... [mailto:tri...@tr...] Sent: Sunday, August 24, 2003 10:49 PM To: Lars Fischer Cc: spr...@li... Subject: Re: [Springframework-developer] Example classes needed Lars, Loading ContextLoaderServlet as a servlet with load-on-startup set to 1 = and loading DispatcherServlet with load-on-startup set to 2 works for me on = WebLogic 8.1 SP1. If it does not work, could you send me the web.xml and your = log output? Also, I get the same errors deploying the Petclinic, so it does not work = for me. Can you send me the petclinic war file that works with WebLogic 8.1 SP1 = so I can try it on my server? Thomas > Thomas, >=20 > thanks for the suggestion. Tried it but it doesn't work. >=20 > This is a serious one: >=20 > Tested my app with Tomcat 4.1.24 and it works. >=20 > I does NOT work with >=20 > WebLogic 8.1 SP1, WebLogic Express SP1, WebLogic 7.0 SP3. >=20 > What makes me wonder is that Petclinic works with WebLogic 8.1 SP1. >=20 > Regards > Lars >=20 > > Lars, > >=20 > > I have looked into this a little bit more. What happens is that=20 > > ServletContextListener.contextInitialized() method is called _after_ = the =20 > > HttpServlet.init() method is called on servlets specified with = <load-on- > > startup>. This causes the xxx-servlet.xml to be loaded before the=20 > > applicationContext.xml is loaded, so that is why you can't reference = > > the 'cwxDao' bean. This behavior is the opposite of what I see for > > Tomcat,=20 > > and I'm sure the same is true for Orion and Resin that Juergen is = using.=20 > > I=20 > > looked in the Servlet 2.3 specification, but I did not see anything > > specifying=20 > > which order these methods should be called in. Maybe Juergen or Rod = can > > shed=20 > > some more light on this issue. =20 > >=20 > > You should be able to use the ContextLoaderServlet for now. > >=20 > > Thomas |