LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Tomcat Cluster- how to share war file (https://www.linuxquestions.org/questions/linux-server-73/tomcat-cluster-how-to-share-war-file-4175443762/)

vignesh4sh 01-02-2013 01:04 AM

Tomcat Cluster- how to share war file
 
Hi,
I have configured tomcat clustering in sticky session. this is my jk_workers.properties details
Quote:

worker.list=adserve
worker.tomcat1.port=6109
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=5

worker.tomcat2.port=6209
worker.tomcat2.host=localhost
worker.tomcat2.type=ajp13
worker.tomcat2.lbfactor=3

worker.adserve.type=lb
worker.adserve.balance_workers=tomcat1,tomcat2
worker.adserve.sticky_session=1
Its working fine.but how to check sticky sesson is worked????

How to share deployed war files to other tomcat.
eg: if i delpoy war file in tomcat1 it should share to tomcat2.how to configure
please give me suggestion

robertjinx 01-02-2013 03:00 AM

First you need to setup each tomcat to support this, plus the war app needs to support clustering, otherwise you will need to deploy the war on both tomcats manually.

vignesh4sh 01-02-2013 03:06 AM

Thanks for reply.

I setup each tomcat to support and session works fine.but i used to deploy war file on each tomcat.
How to share war file from tomcat1 to others.How to configure???
I have no idea about this war file sharing concept.
please give me any suggestion.

Thanks

robertjinx 01-03-2013 02:10 AM

Read this:

http://www.mulesoft.com/tomcat-clustering
http://tomcat.apache.org/tomcat-6.0-...ter-howto.html
http://www.easywayserver.com/impleme...clustering.htm

If you set the tomcats up like this and deploy the war file only on one of them it should deploy them on all tomcats, but only if the applications supports it, otherwise you can't do it, no matter whats the config.

Quote:

Add distributed tag in web.xml

Next step to do add distributed tag in web.xml to switching session among the tomcat clustering instance

Make any application, e.g we are making cluster as application folder in webapps

1. TomcatA - > webapps - > cluster -> WEB-INF -> web.xml
2. TomcatB - > webapps - > cluster -> WEB-INF -> web.xml
3. TomcatC - > webapps - > cluster -> WEB-INF -> web.xml

Add <distributable /> in all three web.xml file



<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<distributable />

</web-app>


All times are GMT -5. The time now is 04:54 PM.