Chapter 17: Clustering … The following table shows the jvmRoute attribute values that you need to set for each of the three Tomcat instances. Instance Name File to Modify jvmRoute Value machine1 machine2 machine3 clustermachine1confserver.xml clustermachine2confserver.xml clustermachine3confserver.xml machine1 machine2 machine3 If you are configuring on three physical machines, you must configure the Tomcat instance on each machine with a different jvmRoutevalue. Setting the Attribute for Web Applications Instead of creating a Web application from scratch, this experiment takes advantage of the existing jsp-examples Web application. To indicate to the Servlet container (Tomcat 6) that this application can be clustered, a Servlet 2.4 standard element is placed into the application s deployment descriptor: the web.xmlfile. The following code shows the placement of the element. If you remove this element, the session maintained by this application across the three Tomcat 6 instances will not be shared: Servlet and JSP Examples. Servlet and JSP Examples Servlet Mapped Filter filters.ExampleFilter … This element must be manually added to the web.xml file in all three instances: . clustermachine1webappsexamplesWEB-INFweb.xml . clustermachine2webappsexamplesWEB-INFweb.xml . clustermachine3webappsexamplesWEB-INFweb.xml
For high quality website hosting services please check java web hosting website.
This entry was posted
on Sunday, November 15th, 2009 at 3:30 am and is filed under tomcat.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.