There may be better ways, but one approach which occurs to me is to set 
unique jvmRoute values on the engines in the server.xml.  Even though you 
aren't using mod_jk, this will result in the provided values being 
appended to the sessionid.  Assuming that you are establishing sessions, 
and that your hardware balancer has sticky session logic, so once a 
session is established, the user's subsequent requests get sent to the 
same backend, this would allow you to distinguish which tomcat instance is 
being used when processing a request for a user.  This would be apparent 
within your webapp by examining the sessionid, but also from the client 
side, by examining the jsessionid cookie value.



Please respond to "Tomcat Users List" <users@tomcat.apache.org>

To:     "Tomcat Users List" <users@tomcat.apache.org>
cc:      
Subject:        Need a way to identify tomcat instances at run-time


I have a struts-based application running on multiple tomcat instances, 
load balanced by a hardware load balancer, i.e., no Apache Web Server. I 
need a way at run-time to know which tomcat instance it is. Is there a way 
to access info in the server.xml or context.xml file at run-time? Can I 
specify some arbitrary value in either of those xml files that would be 
available at run-time? Is there some other way to identify the tomcat 
instance at run-time? Is there a way to access CATALINA_HOME or 
CATALINA_BASE at run-time?

Any ideas would be appreciated.

Thanks,
Brian Barnett



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to