wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Using attribute jvmRoute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Using attribute jvmRoute" Watch "Using attribute jvmRoute" New topic
Author

Using attribute jvmRoute

Royston Nadar
Greenhorn

Joined: Jul 26, 2011
Posts: 6

Greetings,

In Tomcat's server.xml file, there's a Engine tag with attribute jvmRoute, like this :
<Engine name="Catalina" defaultHost="svr-myapp1" jvmRoute="server1">

Based on my research, I know this attribute is used in conjunction with the Apache load balancer. In the project which I currently working on, load balancing of two Tomcat servers is done by F5 Network, and it doesn't use the jvmRoute attribute. My question is, is it safe to just add this attribute in the server.xml, or will this have consequences?

The reason is need the jvmRoute attribute is because I'm need to store all session IDs created by the container in the DB. With jvmRoute, I can differentiate the session ID whether they were created by server1 or server2. Attribute jvmRoute will append the string specified in every session IDs created, for e.g D3743GDUI38484.server1. I would also appreciate any other suggestion to make server indicator appear with the session ID. Thanks.

Jason
Volker Weinberger
Greenhorn

Joined: Nov 07, 2011
Posts: 2
Hi,

as you already wrote, tomcat will add the jvmRoute to the JSESSIONID (<JSESSIONID>.<JVMROUTE>). If that is no problem for the F5 Network than i would
say there is no consequence.

Volker
Royston Nadar
Greenhorn

Joined: Jul 26, 2011
Posts: 6

Thanks Volker. I will decide whether to proceed the changes.
 
Don't get me started about those stupid light bulbs.
 
subject: Using attribute jvmRoute
 
Similar Threads
Session Migration
Load Balancing Problem with jsessionid
Apache Tomcat5.5 clustering problem with Apache HTTP server 2.2.4
Tomcat Configuration with more than 2,000 apps
listen on multiple ports