You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Virtual Light <vi...@hotmail.com> on 2008/04/29 23:01:02 UTC
listener load order
I have a listener that I have added to my web.xml file that needs to load before my webservice servlet is loaded. My understanding was that web.xml is processed in the order in which the entries are made. The listener is the first thing in this file yet it appears to be being processed after the servlet which I have added a load on startup param of 2 to see if this would make a difference. Is there some trick that I have missed here? An entry in the geronimo web.xml file? Some other way to force the listener to load first?
Regards,
Bill
RE: listener load order
Posted by Virtual Light <vi...@hotmail.com>.
David thanks for the the reply. I am using geronimo 2.0 with Tomcat 6 all of which are part of Websphere Community edition. The web service servlet is being loaded first as the init method is being called and the configurations parameters that would be there if the listener had loaded first are null. I verified this by removing the listener from my web.xml file and calling the initialize method of this software from within the init method of my webservice which produced the expected results. Calling the initialize method directly is not the preffered way to start this software up but it does provide me a temporary work around.
Regards,
Bill
From: david_jencks@yahoo.com
To: user@geronimo.apache.org
Subject: Re: listener load order
Date: Tue, 29 Apr 2008 14:19:56 -0700
On Apr 29, 2008, at 2:01 PM, Virtual Light wrote:I have a listener that I have added to my web.xml file that needs to load before my webservice servlet is loaded. My understanding was that web.xml is processed in the order in which the entries are made.
I don't think you can ever rely on that behavior. For instance the load-on-startup for servlets definitely can contradict the order.
The listener is the first thing in this file yet it appears to be being processed after the servlet which I have added a load on startup param of 2 to see if this would make a difference. Is there some trick that I have missed here? An entry in the geronimo web.xml file? Some other way to force the listener to load first?
In our jetty implementation we have code that should be loading all the listeners before any servlets or filters. I would expect tomcat would load all the listeners before anything else, and AFAIK spring apps depend on this behavior. Knowing which geronimo version and which web container you are using might help to track down the problem.
How do you determine that the listener is created after the servlet?
thanksdavid jencks
Regards,
Bill
RE: listener load order
Posted by Virtual Light <vi...@hotmail.com>.
David thanks for the the reply. I am using geronimo 2.0 with Tomcat 6
all of which are part of Websphere Community edition. The web service
servlet is being loaded first as the init method is being called and
the configurations parameters that would be there if the listener had
loaded first are null. I verified this by removing the listener from
my web.xml file and calling the initialize method of this software from
within the init method of my webservice which produced the expected
results. Calling the initialize method directly is not the preffered
way to start this software up but it does provide me a temporary work
around.
Regards,
Bill
From: david_jencks@yahoo.com
To: user@geronimo.apache.org
Subject: Re: listener load order
Date: Tue, 29 Apr 2008 14:19:56 -0700
On Apr 29, 2008, at 2:01 PM, Virtual Light wrote:I have a listener that I have added to my web.xml file that needs to load before my webservice servlet is loaded. My understanding was that web.xml is processed in the order in which the entries are made.
I don't think you can ever rely on that behavior. For instance the load-on-startup for servlets definitely can contradict the order.
The listener is the first thing in this file yet it appears to be being processed after the servlet which I have added a load on startup param of 2 to see if this would make a difference. Is there some trick that I have missed here? An entry in the geronimo web.xml file? Some other way to force the listener to load first?
In our jetty implementation we have code that should be loading all the listeners before any servlets or filters. I would expect tomcat would load all the listeners before anything else, and AFAIK spring apps depend on this behavior. Knowing which geronimo version and which web container you are using might help to track down the problem.
How do you determine that the listener is created after the servlet?
thanksdavid jencks
Regards,
Bill
Re: listener load order
Posted by David Jencks <da...@yahoo.com>.
On Apr 29, 2008, at 2:01 PM, Virtual Light wrote:
> I have a listener that I have added to my web.xml file that needs to
> load before my webservice servlet is loaded. My understanding was
> that web.xml is processed in the order in which the entries are made.
I don't think you can ever rely on that behavior. For instance the
load-on-startup for servlets definitely can contradict the order.
> The listener is the first thing in this file yet it appears to be
> being processed after the servlet which I have added a load on
> startup param of 2 to see if this would make a difference. Is there
> some trick that I have missed here? An entry in the geronimo
> web.xml file? Some other way to force the listener to load first?
In our jetty implementation we have code that should be loading all
the listeners before any servlets or filters. I would expect tomcat
would load all the listeners before anything else, and AFAIK spring
apps depend on this behavior. Knowing which geronimo version and
which web container you are using might help to track down the problem.
How do you determine that the listener is created after the servlet?
thanks
david jencks
>
>
> Regards,
> Bill