Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can two tomcat "Workers" -> Share "One" CACHE dir ?

Status
Not open for further replies.

tarn

Technical User
Aug 19, 2001
534
GB
Ok, we are conducting a trial with two workers on one server; in short, our content xml is sourced from "one" data store area and is parsed by cocoon to produce the site.

The two tomcat workers "each" have a $TOMCATHOME/work directory that each contain the localhost/ {cocoon} cache files.

We sometimes find these are getting out of step and we have to clear them and start again,

Ok here it comes ......
Question:
Has anyone else tried making the $TOMCATHOME/work directory a symbolic link thus allowing the two workers to share this cache?

Oh! .. And if so did it work or were there any sharing/locking violations?

I'd apriciate any views on this.

Thanks in advance

L.
 
Ok time to reply to myself here......

I have been running this now for a week on one side of a live environment and all looks good.

So in short "yes this can be done"

basically stop both tomcat workers copy away each /var/tomcat/$TOMCATWORKERn/work dir then mkdir /var/tomcat/work and
ln -s /var/tomcat/$TOMCATWORKER1/work /var/tomcat/work
&
ln -s /var/tomcat/$TOMCATWORKER2/work /var/tomcat/work

Restart tomcat 1 & 2

Ok
L.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top