You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "King, Sean" <Se...@ca.com> on 2007/10/04 15:24:52 UTC

Webapp load order tomcat 4 vs tomcat 5

 Hi all,
 
I have two webapps that need to interact with each other. One is a fully
expanded webapp ( app1 ) and the other is expanded from a war file (
app2.war ).
 
For the application to run correctly, app2 must be deployed and start
before app1. Using tomcat 5 this does not seem to be a problem. When I
start tomcat, app2 is deployed and then app1 starts and is able to
access jars in app2. I am hoping that this start order is not just pure
chance!!
 
I am now trying to port the application back to tomcat 4. Unfortunately
I am consistently seeing that app1 starts first and then app2 is
deployed from the war. Since app1 depends on app2 this is a major
problem.
 
Is there any way in tomcat 4 to force the war file to be deployed first?
 
Any help would be greatly appreciated.
 
Regards.
 
Sean King
Computer Associates
Software Engineer
Tel: +1 603 334 2168
Fax: +1 603 334 2934
sean.king@ca.com

 

RE: Webapp load order tomcat 4 vs tomcat 5

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: King, Sean [mailto:Sean.King@ca.com] 
> Subject: RE: Webapp load order tomcat 4 vs tomcat 5
> 
> Unfortunately that would break the SDK.  I am going to look into the
> route of having one webapp watch for the other one to come on line.

What about not implementing another webapp, but just extending the one
the 3rd party is providing?  That would avoid both the synchronization
and the jar access issues.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Webapp load order tomcat 4 vs tomcat 5

Posted by "King, Sean" <Se...@ca.com>.
Chris,

Unfortunately that would break the SDK.  I am going to look into the
route of having one webapp watch for the other one to come on line.

Sean 

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Thursday, October 04, 2007 12:18 PM
To: Tomcat Users List
Subject: Re: Webapp load order tomcat 4 vs tomcat 5

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean,

King, Sean wrote:
> It's a lomg story, but basically I am hooking into an SDK supplied by 
> a third party. The fact that I need to access jars in another web app 
> is their design.

:(

Ar you allowed to copy those JAR files into your own app? I realize that
doesn't solve your load order problem, but at least it would de-couple
them a little bit.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBRIf9CaO5/Lv0PARArcMAJwOlo1ftkuOrXcb63Av3QdhLX0jYQCeMz6E
ORFht1qZnRZ6WIog1SImt+U=
=mVHK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp load order tomcat 4 vs tomcat 5

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean,

King, Sean wrote:
> It's a lomg story, but basically I am hooking into an SDK supplied by a
> third party. The fact that I need to access jars in another web app is
> their design.

:(

Ar you allowed to copy those JAR files into your own app? I realize that
doesn't solve your load order problem, but at least it would de-couple
them a little bit.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBRIf9CaO5/Lv0PARArcMAJwOlo1ftkuOrXcb63Av3QdhLX0jYQCeMz6E
ORFht1qZnRZ6WIog1SImt+U=
=mVHK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Webapp load order tomcat 4 vs tomcat 5

Posted by "King, Sean" <Se...@ca.com>.
Chris,

It's a lomg story, but basically I am hooking into an SDK supplied by a
third party. The fact that I need to access jars in another web app is
their design.

Sean 

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Thursday, October 04, 2007 12:11 PM
To: Tomcat Users List
Subject: Re: Webapp load order tomcat 4 vs tomcat 5

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean,

King, Sean wrote:
> When I
> start tomcat, app2 is deployed and then app1 starts and is able to 
> access jars in app2.

Uh... care to explain what /that/ means? Why are you having one app
steal JAR files out of another one? And furthermore, why would those JAR
files need to be "served" by a running web application?

I think I'm missing something crucial.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBRCh9CaO5/Lv0PARAjbZAKC4e7lTy+lWmujZU1yU1Fz8e4M7wgCgoqVa
9ymQIRfVGdpYkycYnchWjZo=
=JSEn
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp load order tomcat 4 vs tomcat 5

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean,

King, Sean wrote:
> When I
> start tomcat, app2 is deployed and then app1 starts and is able to
> access jars in app2.

Uh... care to explain what /that/ means? Why are you having one app
steal JAR files out of another one? And furthermore, why would those JAR
files need to be "served" by a running web application?

I think I'm missing something crucial.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBRCh9CaO5/Lv0PARAjbZAKC4e7lTy+lWmujZU1yU1Fz8e4M7wgCgoqVa
9ymQIRfVGdpYkycYnchWjZo=
=JSEn
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp load order tomcat 4 vs tomcat 5

Posted by David Smith <dn...@cornell.edu>.
Webapp load order is indeed pretty much by chance.  No guarantee has 
ever been made regarding any start order.  I would recommend you add 
code to  app1 so it can gracefully deal with the chance app2 is not 
available.

--David

King, Sean wrote:

> Hi all,
> 
>I have two webapps that need to interact with each other. One is a fully
>expanded webapp ( app1 ) and the other is expanded from a war file (
>app2.war ).
> 
>For the application to run correctly, app2 must be deployed and start
>before app1. Using tomcat 5 this does not seem to be a problem. When I
>start tomcat, app2 is deployed and then app1 starts and is able to
>access jars in app2. I am hoping that this start order is not just pure
>chance!!
> 
>I am now trying to port the application back to tomcat 4. Unfortunately
>I am consistently seeing that app1 starts first and then app2 is
>deployed from the war. Since app1 depends on app2 this is a major
>problem.
> 
>Is there any way in tomcat 4 to force the war file to be deployed first?
> 
>Any help would be greatly appreciated.
> 
>Regards.
> 
>Sean King
>Computer Associates
>Software Engineer
>Tel: +1 603 334 2168
>Fax: +1 603 334 2934
>sean.king@ca.com
>
> 
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp load order tomcat 4 vs tomcat 5

Posted by Gabe Wong <ga...@ngasi.com>.
Actually after re-reading your post, Chuck's suggestion makes better sense.

King, Sean wrote:
> Gabe,
>
> Could you provide a little more detail on this? Unfortunately I am no
> tomcat expert.
>
> How would running two JVM's help?
>
> Sean
>
> -----Original Message-----
> From: Gabe Wong [mailto:gabrielw@ngasi.com] 
> Sent: Thursday, October 04, 2007 10:21 AM
> To: Tomcat Users List
> Subject: Re: Webapp load order tomcat 4 vs tomcat 5
>
> Sean,
>  From your description, it seems that communication between the 2 apps
> is done over the wire.
> If that is the case, why not run each under a separate JVM/Application
> Server to avoid the class loading conflict.
>
> King, Sean wrote:
>   
>> Without giving away too much information...
>>
>> I am working on an integration between the application that I develop 
>> and a third party application. A requirement of the integration is 
>> that my app receive unsolicited notifications from the third party app
>>     
>
>   
>> relating to status changes. This is achieved via a Muse webservice. 
>> The third party developers have provided my with all of the required 
>> Muse "stuff" in a war file. The war file contains a class that 
>> registers and maintains connections between my app and the other.
>>
>> So, to cut a long story short, my app needs to register with the 
>> supplied web app for the integration to work.
>>
>> This seems to work seamlessly with tomcat5 and this methodology is 
>> what we are planning to go into production with.
>>
>> Now it sounds like a bad idea!! 
>>
>> -----Original Message-----
>> From: Peter Crowther [mailto:Peter.Crowther@melandra.com]
>> Sent: Thursday, October 04, 2007 9:36 AM
>> To: Tomcat Users List
>> Subject: RE: Webapp load order tomcat 4 vs tomcat 5
>>
>>   
>>     
>>> From: King, Sean [mailto:Sean.King@ca.com] For the application to run
>>>       
>
>   
>>> correctly, app2 must be deployed and start before app1. Using tomcat 
>>> 5
>>>     
>>>       
>>   
>>     
>>> this does not seem to be a problem. When I start tomcat, app2 is 
>>> deployed and then app1 starts and is able to access jars in app2. I 
>>> am
>>>     
>>>       
>>   
>>     
>>> hoping that this start order is not just pure chance!!
>>>     
>>>       
>> It is, indeed, pure chance.
>>
>>   
>>     
>>> I am now trying to port the application back to tomcat 4. 
>>> Unfortunately
>>> I am consistently seeing that app1 starts first and then app2 is 
>>> deployed from the war. Since app1 depends on app2 this is a major 
>>> problem.
>>>  
>>> Is there any way in tomcat 4 to force the war file to be deployed 
>>> first?
>>>     
>>>       
>> Hack the Tomcat source and recompile :-).
>>
>> More seriously, no, you can't rely on the startup order of webapps.  
>> As I recall, you can't even assume that only one will be started at 
>> one time (I'm sure the more experienced list members will correct me 
>> if the spec disallows this).  You can try playing around with 
>> filenames until the order magically reverses, or you can amend the 
>> apps so that app1 doesn't need to access jars in app2 (which is, 
>> anyway, a bit unpleasant).
>>
>> Can you give us more information about why app1 needs app2 to start 
>> first?  There may well be ways round the problem.
>>
>> 		- Peter
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
>> e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
>> e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>   
>>     
>
>
> --
> Regards
>
> Gabe Wong
> Private JVM JAVA Hosting Automation
> http://www.ngasi.com
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
> e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


-- 
Regards

Gabe Wong
Private JVM JAVA Hosting Automation
http://www.ngasi.com


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Webapp load order tomcat 4 vs tomcat 5

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: King, Sean [mailto:Sean.King@ca.com] 
> Subject: RE: Webapp load order tomcat 4 vs tomcat 5
>
> How would running two JVM's help?

It wouldn't.  Your problem is one of synchronization, not classloader
conflicts.

You might try implementing a listener in app1 that periodically probes
app2 and does the registration when app2 is available.  Any notification
logic would have to be held until the registration completes, of course.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Webapp load order tomcat 4 vs tomcat 5

Posted by "King, Sean" <Se...@ca.com>.
Gabe,

Could you provide a little more detail on this? Unfortunately I am no
tomcat expert.

How would running two JVM's help?

Sean

-----Original Message-----
From: Gabe Wong [mailto:gabrielw@ngasi.com] 
Sent: Thursday, October 04, 2007 10:21 AM
To: Tomcat Users List
Subject: Re: Webapp load order tomcat 4 vs tomcat 5

Sean,
 From your description, it seems that communication between the 2 apps
is done over the wire.
If that is the case, why not run each under a separate JVM/Application
Server to avoid the class loading conflict.

King, Sean wrote:
> Without giving away too much information...
>
> I am working on an integration between the application that I develop 
> and a third party application. A requirement of the integration is 
> that my app receive unsolicited notifications from the third party app

> relating to status changes. This is achieved via a Muse webservice. 
> The third party developers have provided my with all of the required 
> Muse "stuff" in a war file. The war file contains a class that 
> registers and maintains connections between my app and the other.
>
> So, to cut a long story short, my app needs to register with the 
> supplied web app for the integration to work.
>
> This seems to work seamlessly with tomcat5 and this methodology is 
> what we are planning to go into production with.
>
> Now it sounds like a bad idea!! 
>
> -----Original Message-----
> From: Peter Crowther [mailto:Peter.Crowther@melandra.com]
> Sent: Thursday, October 04, 2007 9:36 AM
> To: Tomcat Users List
> Subject: RE: Webapp load order tomcat 4 vs tomcat 5
>
>   
>> From: King, Sean [mailto:Sean.King@ca.com] For the application to run

>> correctly, app2 must be deployed and start before app1. Using tomcat 
>> 5
>>     
>
>   
>> this does not seem to be a problem. When I start tomcat, app2 is 
>> deployed and then app1 starts and is able to access jars in app2. I 
>> am
>>     
>
>   
>> hoping that this start order is not just pure chance!!
>>     
>
> It is, indeed, pure chance.
>
>   
>> I am now trying to port the application back to tomcat 4. 
>> Unfortunately
>> I am consistently seeing that app1 starts first and then app2 is 
>> deployed from the war. Since app1 depends on app2 this is a major 
>> problem.
>>  
>> Is there any way in tomcat 4 to force the war file to be deployed 
>> first?
>>     
>
> Hack the Tomcat source and recompile :-).
>
> More seriously, no, you can't rely on the startup order of webapps.  
> As I recall, you can't even assume that only one will be started at 
> one time (I'm sure the more experienced list members will correct me 
> if the spec disallows this).  You can try playing around with 
> filenames until the order magically reverses, or you can amend the 
> apps so that app1 doesn't need to access jars in app2 (which is, 
> anyway, a bit unpleasant).
>
> Can you give us more information about why app1 needs app2 to start 
> first?  There may well be ways round the problem.
>
> 		- Peter
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
> e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
> e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


--
Regards

Gabe Wong
Private JVM JAVA Hosting Automation
http://www.ngasi.com


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp load order tomcat 4 vs tomcat 5

Posted by Gabe Wong <ga...@ngasi.com>.
Sean,
 From your description, it seems that communication between the 2 apps 
is done over the wire.
If that is the case, why not run each under a separate JVM/Application 
Server to avoid the class loading conflict.

King, Sean wrote:
> Without giving away too much information...
>
> I am working on an integration between the application that I develop
> and a third party application. A requirement of the integration is that
> my app receive unsolicited notifications from the third party app
> relating to status changes. This is achieved via a Muse webservice. The
> third party developers have provided my with all of the required Muse
> "stuff" in a war file. The war file contains a class that registers and
> maintains connections between my app and the other.
>
> So, to cut a long story short, my app needs to register with the
> supplied web app for the integration to work.
>
> This seems to work seamlessly with tomcat5 and this methodology is what
> we are planning to go into production with.
>
> Now it sounds like a bad idea!! 
>
> -----Original Message-----
> From: Peter Crowther [mailto:Peter.Crowther@melandra.com] 
> Sent: Thursday, October 04, 2007 9:36 AM
> To: Tomcat Users List
> Subject: RE: Webapp load order tomcat 4 vs tomcat 5
>
>   
>> From: King, Sean [mailto:Sean.King@ca.com] For the application to run 
>> correctly, app2 must be deployed and start before app1. Using tomcat 5
>>     
>
>   
>> this does not seem to be a problem. When I start tomcat, app2 is 
>> deployed and then app1 starts and is able to access jars in app2. I am
>>     
>
>   
>> hoping that this start order is not just pure chance!!
>>     
>
> It is, indeed, pure chance.
>
>   
>> I am now trying to port the application back to tomcat 4. 
>> Unfortunately
>> I am consistently seeing that app1 starts first and then app2 is 
>> deployed from the war. Since app1 depends on app2 this is a major 
>> problem.
>>  
>> Is there any way in tomcat 4 to force the war file to be deployed 
>> first?
>>     
>
> Hack the Tomcat source and recompile :-).
>
> More seriously, no, you can't rely on the startup order of webapps.  As
> I recall, you can't even assume that only one will be started at one
> time (I'm sure the more experienced list members will correct me if the
> spec disallows this).  You can try playing around with filenames until
> the order magically reverses, or you can amend the apps so that app1
> doesn't need to access jars in app2 (which is, anyway, a bit
> unpleasant).
>
> Can you give us more information about why app1 needs app2 to start
> first?  There may well be ways round the problem.
>
> 		- Peter
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
> e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


-- 
Regards

Gabe Wong
Private JVM JAVA Hosting Automation
http://www.ngasi.com


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Webapp load order tomcat 4 vs tomcat 5

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean,

King, Sean wrote:
> So, to cut a long story short, my app needs to register with the
> supplied web app for the integration to work.

You could always deploy them into separate TC instances. Then you can
just start one of them before the other.

Another option is lazy registration: wait until you actually need the
other webapp in order to connect to it. If the connection is attempted
before the service is available it will fail. BUT it will re-try next
time. Then it doesn't matter in what order the webapps are ready.


- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBREl9CaO5/Lv0PARAtqVAKC1VaKJJNkG6Wn4QuLCictL10xc8gCfUbE0
5yGL2J/oN5g3QcMJxDr0pq4=
=hIEn
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Webapp load order tomcat 4 vs tomcat 5

Posted by "King, Sean" <Se...@ca.com>.
Without giving away too much information...

I am working on an integration between the application that I develop
and a third party application. A requirement of the integration is that
my app receive unsolicited notifications from the third party app
relating to status changes. This is achieved via a Muse webservice. The
third party developers have provided my with all of the required Muse
"stuff" in a war file. The war file contains a class that registers and
maintains connections between my app and the other.

So, to cut a long story short, my app needs to register with the
supplied web app for the integration to work.

This seems to work seamlessly with tomcat5 and this methodology is what
we are planning to go into production with.

Now it sounds like a bad idea!! 

-----Original Message-----
From: Peter Crowther [mailto:Peter.Crowther@melandra.com] 
Sent: Thursday, October 04, 2007 9:36 AM
To: Tomcat Users List
Subject: RE: Webapp load order tomcat 4 vs tomcat 5

> From: King, Sean [mailto:Sean.King@ca.com] For the application to run 
> correctly, app2 must be deployed and start before app1. Using tomcat 5

> this does not seem to be a problem. When I start tomcat, app2 is 
> deployed and then app1 starts and is able to access jars in app2. I am

> hoping that this start order is not just pure chance!!

It is, indeed, pure chance.

> I am now trying to port the application back to tomcat 4. 
> Unfortunately
> I am consistently seeing that app1 starts first and then app2 is 
> deployed from the war. Since app1 depends on app2 this is a major 
> problem.
>  
> Is there any way in tomcat 4 to force the war file to be deployed 
> first?

Hack the Tomcat source and recompile :-).

More seriously, no, you can't rely on the startup order of webapps.  As
I recall, you can't even assume that only one will be started at one
time (I'm sure the more experienced list members will correct me if the
spec disallows this).  You can try playing around with filenames until
the order magically reverses, or you can amend the apps so that app1
doesn't need to access jars in app2 (which is, anyway, a bit
unpleasant).

Can you give us more information about why app1 needs app2 to start
first?  There may well be ways round the problem.

		- Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Webapp load order tomcat 4 vs tomcat 5

Posted by Peter Crowther <Pe...@melandra.com>.
> From: King, Sean [mailto:Sean.King@ca.com] 
> For the application to run correctly, app2 must be deployed and start
> before app1. Using tomcat 5 this does not seem to be a problem. When I
> start tomcat, app2 is deployed and then app1 starts and is able to
> access jars in app2. I am hoping that this start order is not 
> just pure chance!!

It is, indeed, pure chance.

> I am now trying to port the application back to tomcat 4. 
> Unfortunately
> I am consistently seeing that app1 starts first and then app2 is
> deployed from the war. Since app1 depends on app2 this is a major
> problem.
>  
> Is there any way in tomcat 4 to force the war file to be 
> deployed first?

Hack the Tomcat source and recompile :-).

More seriously, no, you can't rely on the startup order of webapps.  As
I recall, you can't even assume that only one will be started at one
time (I'm sure the more experienced list members will correct me if the
spec disallows this).  You can try playing around with filenames until
the order magically reverses, or you can amend the apps so that app1
doesn't need to access jars in app2 (which is, anyway, a bit
unpleasant).

Can you give us more information about why app1 needs app2 to start
first?  There may well be ways round the problem.

		- Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org