On Nov 21, 2013, at 4:58 PM, Leo Donahue - OETX <leodona...@mail.maricopa.gov> 
wrote:

>> -----Original Message-----
>> From: Daniel Mikusa [mailto:dmik...@gopivotal.com]
>> Subject: Re: How to Deploy an Update to War File
>> 
>> If you're using Tomcat 7, it's called Parallel Deployment.
>> 
>> Dan
> 
> Can you describe this process a little more?

Here's a very quick explanation.  

1.) When you deploy, format your context name as "<context-path>##<version>".  
2.) Tomcat will deploy your app and parse off the "##<version>".  Giving you 
multiple versions of the same context path.
3.) When you deploy a new version (new version string > than old version 
string), Tomcat will send new requests to that application as documented here.

  
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Parallel_deployment

4.) After all sessions have been moved to the latest application, if 
"undeployOldVersions" is true" the older version will be undeployed.

You can probably find more detailed explanations by googling for "tomcat 
parallel deployment".

> So, in other words, if I want to use parallel deployment, I create 
> context.xml files in conf/Catalina/localhost with distinct names, but use the 
> same value for the path?  

No.  You would just name the file 
"conf/Catalina/localhost/<context-path>##<version>.xml".

> So this kind of answers my question about why I would want war files located 
> outside of appBase.

Not sure I follow here.  You can use parallel deployment with WAR files.  Just 
name the war file "webapps/<context-path>##<version>.war".

> Does undeployOldVersions clean up the context.xml files in 
> conf/Catalina/localhost or just the war files?

Sorry, I'm not sure off the top of my head.  Maybe someone else can clarify 
here or just give it a try and see.

> I hear in the back of my head Chuck saying that we should not use the path 
> element in the Context.  

This does not change the rules on when you can use the path attribute on a 
Context tag.

Dan

> Was that only for contexts defined in META-INF?
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to