wood burning stoves 2.0*
The moose likes Tomcat and the fly likes FarmWarDeployer: Clusterwide hot deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "FarmWarDeployer: Clusterwide hot deployment" Watch "FarmWarDeployer: Clusterwide hot deployment" New topic
Author

FarmWarDeployer: Clusterwide hot deployment

birenshah shahbiren
Greenhorn

Joined: Feb 28, 2008
Posts: 19

Hi,

A small issue with FarmWarDeployer on Apache Tomcat 5.5.
I have two servers A & B

My deployer tag is as below for A.
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
deployDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/webapps"
tempDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/temp"
watchDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/watch"
watchEnabled="true"/> <!-- This is set to false on Server B-->

When I put WAR file in watchDir, it gets copied to all the nodes in the cluster, but application doesn't get deployed.
Moreover if I change watchDir = C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/webapps, application gets deployed only on the master server.

Suggestion please.

Thanks,
Biren
birenshah shahbiren
Greenhorn

Joined: Feb 28, 2008
Posts: 19
Got the solution.

Please use below tag in Master Node:
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer" deployDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/webapps" tempDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/temp" watchDir="C:/TomcatInstances/Instance1/Apache Software Foundation/Tomcat 5.5/watch" watchEnabled="true"/>

Please use below tag in Slave Nodes:
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer" deployDir="C:/TomcatInstances/Instance2/Apache Software Foundation/Tomcat 5.5/webapps" tempDir="C:/TomcatInstances/Instance2/Apache Software Foundation/Tomcat 5.5/temp" watchDir="C:/TomcatInstances/Instance2/Apache Software Foundation/Tomcat 5.5/webapps" watchEnabled="false"/>

Put your WAR file in watchDir of Master Node. Incase you are using Eclipse, please remove option of overriding default setting of tomcat by double clicking on newly created server.
Your WAR will be extracted in webapps directory of each & every node as soon as you put your WAR in watch directory & start all the nodes.

Regards,
Biren
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FarmWarDeployer: Clusterwide hot deployment
 
Similar Threads
tomacat5.5.12
trouble with path
on using GWT.getHostPageBaseURL()
FarmWarDeployer
Setting the classpath to struts jars to compile my actions