jvmRoute as a property
Hi, I would to add a feature: Allow jvmRoute to be a system property. I have several Tomcat's using the same server.xml but I need a different sessionId for each Tomcat. The easy solution I have found is to use jmvRoute=SYSTEM and read the system property jmvRoute to have the jvmRoute I want. I have enclosed the corresponding patch. Should I commit it? Cheers Jean-frederic Index: catalina/src/share/org/apache/catalina/core/StandardEngine.java === RCS file: /home/cvs/mirror/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v retrieving revision 1.15 diff -u -r1.15 StandardEngine.java --- catalina/src/share/org/apache/catalina/core/StandardEngine.java 2 May 2002 22:14:45 - 1.15 +++ catalina/src/share/org/apache/catalina/core/StandardEngine.java 9 Dec 2002 +08:56:06 - @@ -171,6 +171,7 @@ */ public void setDefaultHost(String host) { +this.log(setDefaultHost= + host); String oldDefaultHost = this.defaultHost; if (host == null) { this.defaultHost = null; @@ -191,7 +192,16 @@ */ public void setJvmRoute(String routeId) { this.log(setJvmRoute= + routeId); -jvmRouteId = routeId; +jvmRouteId = null; +if (SYSTEM.equals(routeId)) + this.log(setJvmRoute is SYSTEM!!!); +try { +jvmRouteId = System.getProperty(jvmRoute); +this.log(setJvmRoute read: + jvmRouteId); +} catch(Exception ex) { +} +if (jvmRouteId == null) +jvmRouteId = routeId; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: jvmRoute as a property
jean-frederic clere wrote: Hi, I would to add a feature: Allow jvmRoute to be a system property. I have several Tomcat's using the same server.xml but I need a different sessionId for each Tomcat. The easy solution I have found is to use jmvRoute=SYSTEM and read the system property jmvRoute to have the jvmRoute I want. I have enclosed the corresponding patch. Should I commit it? The feature could be helpful, but the implementation is weird (if you don't call setJvmRoute, which AFAIK only happens when it is defined in server.xml, it will never get set). Probably the code should be put in the StandardEngine constructor or in its start method. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: jvmRoute as a property
Remy Maucherat wrote: jean-frederic clere wrote: Hi, I would to add a feature: Allow jvmRoute to be a system property. I have several Tomcat's using the same server.xml but I need a different sessionId for each Tomcat. The easy solution I have found is to use jmvRoute=SYSTEM and read the system property jmvRoute to have the jvmRoute I want. I have enclosed the corresponding patch. Should I commit it? The feature could be helpful, but the implementation is weird (if you don't call setJvmRoute, which AFAIK only happens when it is defined in server.xml, it will never get set). Probably the code should be put in the StandardEngine constructor or in its start method. Ok, I will set the jvmRoute using the system property jmvRoute in the StandardEngine constructor. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]