LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-02-2013, 01:04 AM   #1
vignesh4sh
Member
 
Registered: Oct 2012
Posts: 69

Rep: Reputation: Disabled
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
 
Old 01-02-2013, 03:00 AM   #2
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
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.
 
Old 01-02-2013, 03:06 AM   #3
vignesh4sh
Member
 
Registered: Oct 2012
Posts: 69

Original Poster
Rep: Reputation: Disabled
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
 
Old 01-03-2013, 02:10 AM   #4
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
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>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error on deployment of war file in tomcat mlnm Linux - Newbie 4 12-07-2011 04:33 PM
share dhcpd.leases file across HA cluster procfs Linux - Newbie 2 10-21-2011 05:41 AM
1.HOW TO DEPLOY A WEB APPLICATION(ex: WAR ) IN TOMCAT AND ECLIPSE USING ANT? devill Programming 9 10-02-2009 02:24 AM
tomcat servlet engine problem using /deploying war files. Apps will not start speedsrfr Linux - Software 0 06-26-2009 07:49 AM
Tomcat 5.5.7 War file deployment failure r_debussy Linux - Software 4 06-02-2005 02:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration