This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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