db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oyvind.Bakk...@Sun.COM
Subject Re: I need some advice to choose database for an upcomming job
Date Wed, 02 Nov 2005 15:40:53 GMT
Michael Segel wrote:
> On Monday 31 October 2005 14:40, Susan Cline wrote:
> 
>>As Jean mentioned, if you use the Prototype integration option of the
>>article you can have the derby jar files in the war file.  I think you can
>>just replace the war file with the new web application that contains the
>>derby jar file(s) in the lib directory without stopping the Tomcat server.
>>
>>I think Tomcat "sees" new war files (possibly depending on how it is
>>configured) when they are placed in the webapps directory.
>>
>>Susan
>>
> 
> Replace the file? 
> I would be very suspect if that were the case.
> Usually your application will open a file descriptor to the files at start up.
> (Your new files don't have the same inode (whatever the Microsoft analogy 
> is ...) So its not the same file.
> 
> This would mean that you would have to "refresh" Tomcat to get it to "see" the 
> new file. 
> 
> Now if you can refresh Tomcat, then you should have the power to start and 
> stop Tomcat.
> 
> If you mean add it to the directory and then have Tomcat "discover" the new 
> files/apps that would be different.

This is what the Tomcat website says about hot deployment of web 
applications:

Deploying on a running Tomcat server

     It is possible to deploy web applications to a running Tomcat server.

     If the Host autoDeploy attribute is "true", the Host will attempt 
to deploy and update web applications dynamically, as needed, for 
example if a new .WAR is dropped into the appBase. For this to work, the 
Host needs to have background processing enabled which is the default 
configuration.

     autoDeploy set to "true" and a running Tomcat allows for:

         * Deployment of .WAR files copied into the Host appBase.
         * Deployment of exploded web applications which are copied into 
the Host appBase.
         * Re-deployment of a web application which has already been 
deployed from a .WAR when the new .WAR is provided. In this case the 
exploded web application is removed, and the .WAR is expanded again. 
Note that the explosion will not occur if the Host is configured so that 
.WARs are not exploded with a unpackWARs attribute set to "false", in 
which case the web application will be simply redeployed as a compressed 
archive.
         * Re-deployment of a web application if the /WEB-INF/web.xml 
file (or any other resource defined as a WatchedResource) is updated.
         * Re-deployment of a web application if the Context Descriptor 
file from which the web application has been deployed is updated.
         * Re-deployment of a web application if a Context Descriptor 
file (with a filename corresponding to the Context path of the 
previously deployed web application) is added to the 
$CATALINA_HOME/conf/[enginename]/[hostname]/ directory.
         * Undeployment of a web application if its document base 
(docBase) is deleted. Note that on Windows, this assumes that 
anti-locking features (see Context configuration) are enabled, otherwise 
it is not possible to delete the resources of a running web application.

     Note that web application reloading can also be configured in the 
loader, in which case loaded classes will be tracked for changes.


My interpretation is that it is actually possible to just replace the 
.war file.

-- 
Oyvind Bakksjo
Sun Microsystems, Database Technology Group
Trondheim, Norway
http://weblogs.java.net/blog/bakksjo/

Mime
View raw message