You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Fu-Tung Cheng <fu...@yahoo.com> on 2008/01/18 00:23:10 UTC

Ordered loading of WAR files

Hi,

I have two war files.  One is an authentication war and the other is setup to use the authentication war via the servlet context.xml mechanism.

On windows my issues appears to be that the context.xml from the auth.war is being cached inside tc/conf/Catalina/localhost/... and that on the 2nd startup it tries to test the connection before the war that is the connection has loaded.  I've solved this temporarily by deleting this directory before startup.

Does anyone know of a better way to do this?  I am using tomcat 6014.

Thanks,

Fu-Tung




      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Re: Ordered loading of WAR files

Posted by Jonadan <jo...@yahoo.com>.
If you deploy apps as deflated, shouldn't that solve your problem?
I mean insstead of war files, just copy directoried as "UNZIPPED".

Regards.



Fu-Tung Cheng wrote:
> 
> Hi,
> 
> I have two war files.  One is an authentication war and the other is setup
> to use the authentication war via the servlet context.xml mechanism.
> 
> On windows my issues appears to be that the context.xml from the auth.war
> is being cached inside tc/conf/Catalina/localhost/... and that on the 2nd
> startup it tries to test the connection before the war that is the
> connection has loaded.  I've solved this temporarily by deleting this
> directory before startup.
> 
> Does anyone know of a better way to do this?  I am using tomcat 6014.
> 
> Thanks,
> 
> Fu-Tung
> 
> 
> 
> 
>      
> ____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now. 
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
> 
> 

-- 
View this message in context: http://www.nabble.com/Ordered-loading-of-WAR-files-tp14937881p14957811.html
Sent from the Tomcat - User mailing list archive at Nabble.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: Ordered loading of WAR files

Posted by "Mark H. Wood" <mw...@IUPUI.Edu>.
On Wed, Jan 23, 2008 at 05:01:35PM +0300, Konstantin Kolinko wrote:
> > On windows my issues appears to be that the context.xml from the
> > auth.war is being cached inside tc/conf/Catalina/localhost/...
> 
> "cached" is not the right word. It is how deployment mechanism works
> in tomcat. The presence of <app_name>.xml in
> tc/conf/Catalina/localhost/ means that you application has been
> successfully deployed.   Removal of the file means that you trigger
> the auto-deployment mechanism for your application.  See
> http://tomcat.apache.org/tomcat-6.0-doc/config/context.html for details
> (look for "$CATALINA_HOME/conf/[enginename]/[hostname]/" there)

Well, I can understand his confusion, as it mirrors my own.  Here is
what it says:

 Context elements may be explicitly defined:

    * in the $CATALINA_HOME/conf/context.xml file: the Context element
      information will be loaded by all webapps
    * in the
      $CATALINA_HOME/conf/[enginename]/[hostname]/context.xml.default
      file: the Context element information will be loaded by all
      webapps of that host
    * in individual files (with a ".xml" extension) in the
      $CATALINA_HOME/conf/[enginename]/[hostname]/ directory. The name
      of the file (less the .xml) extension will be used as the
      context path. Multi-level context paths may be defined using #,
      e.g. context#path.xml. The default web application may be
      defined by using a file called ROOT.xml.
    * if the previous file was not found for this application, in an
      individual file at /META-INF/context.xml inside the application
      files
    * inside a Host element in the main conf/server.xml

 In addition to explicitly specified Context elements, there are
 several techniques by which Context elements can be created
 automatically for you.

Note:  "explicitly defined."  This says to me that
$CATALINA_HOME/conf/[enginename]/[hostname]/contextname.xml, if it
exists, is configuration data provided by the person deploying the
application.  It doesn't say anything about Tomcat owning these files
and being allowed to create and destroy them at will.

The documentation apparently doesn't reflect the behavior of the
code.  Let me say that I find the documented behavior much more useful
than what we actually get.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Typically when a software vendor says that a product is "intuitive" he
means the exact opposite.


Re: Ordered loading of WAR files

Posted by Konstantin Kolinko <kn...@gmail.com>.
> On windows my issues appears to be that the context.xml from the
> auth.war is being cached inside tc/conf/Catalina/localhost/...

"cached" is not the right word. It is how deployment mechanism works
in tomcat. The presence of <app_name>.xml in
tc/conf/Catalina/localhost/ means that you application has been
successfully deployed.   Removal of the file means that you trigger
the auto-deployment mechanism for your application.  See
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html for details
(look for "$CATALINA_HOME/conf/[enginename]/[hostname]/" there)

As for your problem I understand, that you have database connection in
one application, and are reusing it from another one? Is it just that?

It it is the case, I suggest to move connection pool configuration
from application context.xml into GlobalNamingResources of server.xml,
see
http://tomcat.apache.org/tomcat-6.0-doc/config/globalresources.html

In application context.xml you will specify a local synonym for this
global resource using ResourceLink element.

I hope this will help you.

Best regards,
K.

2008/1/18, Fu-Tung Cheng <fu...@yahoo.com>:
> Hi,
>
> I have two war files.  One is an authentication war and the other is setup to use the authentication war via the servlet context.xml mechanism.
>
> On windows my issues appears to be that the context.xml from the auth.war is being cached inside tc/conf/Catalina/localhost/... and that on the 2nd startup it tries to test the connection before the war that is the connection has loaded.  I've solved this temporarily by deleting this directory before startup.
>
> Does anyone know of a better way to do this?  I am using tomcat 6014.
>
> Thanks,
> Fu-Tung
>

---------------------------------------------------------------------
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: Ordered loading of WAR files

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
I believe if you specify your applications as <Context> elements inside 
server.xml, they will be deployed in the order they are specified

Filip

Fu-Tung Cheng wrote:
> Hi,
>
> I have two war files.  One is an authentication war and the other is setup to use the authentication war via the servlet context.xml mechanism.
>
> On windows my issues appears to be that the context.xml from the auth.war is being cached inside tc/conf/Catalina/localhost/... and that on the 2nd startup it tries to test the connection before the war that is the connection has loaded.  I've solved this temporarily by deleting this directory before startup.
>
> Does anyone know of a better way to do this?  I am using tomcat 6014.
>
> Thanks,
>
> Fu-Tung
>
>
>
>
>       ____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
>
>   
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.516 / Virus Database: 269.19.5/1228 - Release Date: 1/16/2008 9:01 AM
>   


---------------------------------------------------------------------
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