tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Menzel <>
Subject Re: Order of WebApp Loading
Date Fri, 16 Sep 2005 14:54:49 GMT
I see,
if i can't count on the order of loading, I tried something other:
I set crossContext="true" for both webapps and while in 
contextInitialized() of the webapp which schould run only after the 
first webapp finished loading
I use context.getContext("/db-app") to look if the first app ist already 
there. If not then it should wait with Thread.sleep().
Unfortunately my Tomcat 5.5 seems to use only one thread for loading all 
web-apps, so if I let it wait the loading of all web-apps is blocked.

Obviously this solution will not work reliably, because it depends on 
the threading model the container uses to load its apps.
Do you have any other recommendations for this issue ?

Kind regards, Peter Menzel

Robert Harper schrieb:

>The case is still that most servlet containers, Tomcat included, are
>multithreaded and order of processing should not be counted on. One app may
>be swapped out while the other app runs. It is far better to write your
>servlets so that there is no dependency on order of operation, order of
>parameters, etc. Another reason not to count on this is that it is not part
>of the specification and one implementation or version of a container may
>choose to provide order or not and this might change. There have been many
>recommendations on how to do this and I would suggest you try them. Your
>apps will probably end up being more scaleable as well.
>Robert S. Harper
>Information Access Technology, Inc.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message