File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FarmWarDeployer: Clusterwide hot deployment

 
birenshah shahbiren
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic