Re: Timeline for beginning EL 3.0 implementation?
Hi Mark, 2013/6/11 Mark Thomas wrote: > > On 11/06/2013 21:29, Nick Williams wrote: >> >> I was looking through EE 7 and the changes to trunk in the last six >> months or so and realized that no work had yet been done to implement >> EL 3.0. Does anyone know what the anticipated timeline is for >> beginning work on EL 3.0? > > > When I've finished the Servlet 3.1 and WebSocket 1.0 implementations or someone else decides to start on it. > > The basic implementations are done. I'm currently reviewing the changes in the spec checking that everything is implemented. That will be followed by reviewing the various EG discussions on the bits the spec doesn't cover very well. > > Once all that is done I was thinking about some form of alpha release before starting work on the EL stuff. > I can join the EL impl also. Regards Violeta
svn commit: r1496000 - /tomcat/taglibs/trunks/
Author: olamy Date: Mon Jun 24 12:07:19 2013 New Revision: 1496000 URL: http://svn.apache.org/r1496000 Log: ignore target directory Modified: tomcat/taglibs/trunks/ (props changed) Propchange: tomcat/taglibs/trunks/ -- --- svn:ignore (original) +++ svn:ignore Mon Jun 24 12:07:19 2013 @@ -4,3 +4,5 @@ out .project .classpath .settings +target + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496001 - /tomcat/taglibs/taglibs-parent/trunk/pom.xml
Author: olamy Date: Mon Jun 24 12:09:30 2013 New Revision: 1496001 URL: http://svn.apache.org/r1496001 Log: remove wrong jenkins url Modified: tomcat/taglibs/taglibs-parent/trunk/pom.xml Modified: tomcat/taglibs/taglibs-parent/trunk/pom.xml URL: http://svn.apache.org/viewvc/tomcat/taglibs/taglibs-parent/trunk/pom.xml?rev=1496001&r1=1496000&r2=1496001&view=diff == --- tomcat/taglibs/taglibs-parent/trunk/pom.xml (original) +++ tomcat/taglibs/taglibs-parent/trunk/pom.xml Mon Jun 24 12:09:30 2013 @@ -41,11 +41,6 @@ UTF-8 - -jenkins -https://builds.apache.org/view/S-Z/view/Tomcat/job/Taglibs-All/ - - bugzilla http://issues.apache.org/bugzilla/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496003 - /tomcat/taglibs/taglibs-parent/trunk/pom.xml
Author: olamy Date: Mon Jun 24 12:14:32 2013 New Revision: 1496003 URL: http://svn.apache.org/r1496003 Log: upgrade some plugin version Modified: tomcat/taglibs/taglibs-parent/trunk/pom.xml Modified: tomcat/taglibs/taglibs-parent/trunk/pom.xml URL: http://svn.apache.org/viewvc/tomcat/taglibs/taglibs-parent/trunk/pom.xml?rev=1496003&r1=1496002&r2=1496003&view=diff == --- tomcat/taglibs/taglibs-parent/trunk/pom.xml (original) +++ tomcat/taglibs/taglibs-parent/trunk/pom.xml Mon Jun 24 12:14:32 2013 @@ -20,7 +20,7 @@ org.apache apache -10 +13 org.apache.taglibs @@ -104,7 +104,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.5.1 + 3.1 ${maven.compiler.source} ${maven.compiler.target} @@ -114,12 +114,12 @@ org.apache.maven.plugins maven-surefire-plugin - 2.12.4 + 2.15 org.apache.maven.plugins maven-site-plugin - 3.1 + 3.3 @@ -128,7 +128,7 @@ org.apache.felix maven-bundle-plugin -2.0.1 +2.4.0 true @@ -146,7 +146,7 @@ org.apache.maven.plugins maven-javadoc-plugin -2.8.1 +2.9 true @@ -157,7 +157,7 @@ org.apache.maven.plugins maven-changes-plugin -2.3 +2.9 @@ -169,17 +169,17 @@ org.apache.maven.plugins maven-jxr-plugin -2.2 +2.3 org.apache.maven.plugins maven-project-info-reports-plugin -2.4 +2.7 org.apache.maven.plugins maven-surefire-report-plugin -2.12 +2.15 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [taglibs] Site plans
Hi, Can be easy :-) mvn site site:stage and all the content of all modules will be in ${project.build.directory}/staging (target/staging). But to achieve this and having something easy we must the site module on the top! Means here http://svn.apache.org/repos/asf/tomcat/taglibs/trunks/ As we don't release the site (that doesn't shok me :-) ). With this tree deploying the site will be as easy as: mvn clean site site:stage && mvn scm-publish:publish-scm Make sense ? I can work on that or help you if you want. 2013/6/24 Henri Yandell : > FYI that I'm digging into the Taglibs site to figure out how it is we go > from 15 Maven target/site directories to 1 site. > > I'm then going to write a dumb shell script that copies the relevant parts > to a Tomcat site/taglibs checkout, allowing for the site to be updated. I'm > sure there's a very clever Maven plugin that can take care of this and > handle the logic of the 15 maven projects becoming 1 site, but I'd rather > build Lego :) > > Hen -- Olivier Lamy Ecetera: http://ecetera.com.au http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Your Gump Build(s)
Dear Community Apache Gump builds some of your projects and it is quite possible you don't know or have by now forgotten about it. More than half a year ago a technical problem has forced us to turn off emails on build failures as we would have been sending out lots of false alarms. Before we re-enable emails we'd like to know whether you are still interested in the service Gump provides, so please tell us. :-) Metadata for many projects have been neglected for a long time and it is quite possible they'd need some love for results to be meaningful. All Apache committers have write access to Gump's metadata. In case you don't know what this Gump stuff is about: Apache Gump builds the full stack of the latest commits of software in order to ensure integrity over releases. Build failures surface API discontinuities between projects before they impact releases, and Gump's e-mail notifications hope to promote the conversations between teams to resolve those discontinuities. When responding to this mail please shorten the CC list as appropriate. Cheers Stefan on behalf of the Gump PMC - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Your Gump Build(s)
On 24/06/2013 14:20, Stefan Bodewig wrote: > Dear Community > > Apache Gump builds some of your projects and it is quite possible you > don't know or have by now forgotten about it. > > More than half a year ago a technical problem has forced us to turn off > emails on build failures as we would have been sending out lots of false > alarms. > > Before we re-enable emails we'd like to know whether you are still > interested in the service Gump provides, so please tell us. :-) Yes please! As an aside, there were (and probably still are) a number of projects with dependencies on very old (and no longer supported) Tomcat versions. It would be good to get those cleaned up. Finding the time to do that has been on my TODO list for a while. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496061 - in /tomcat/trunk: java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java webapps/docs/config/listeners.xml
Author: markt Date: Mon Jun 24 14:06:24 2013 New Revision: 1496061 URL: http://svn.apache.org/r1496061 Log: Changes to java.beans.Introspector#flushCaches() mean that AppContext protection is not required from 1.7.0_02 onwards. Changes to AppContext meant the memory leak protection required a graphical environment from 1.7.0_25 onwards. Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java tomcat/trunk/webapps/docs/config/listeners.xml Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1496061&r1=1496060&r2=1496061&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Mon Jun 24 14:06:24 2013 @@ -59,12 +59,30 @@ public class JreMemoryLeakPreventionList private static final StringManager sm = StringManager.getManager(Constants.Package); +private static final boolean IS_JAVA_7_OR_LATER; + +static { +boolean isJava7OrLater; +try { +Class.forName("java.util.Objects"); +isJava7OrLater = true; +} catch (ClassNotFoundException e) { +isJava7OrLater = false; +} +IS_JAVA_7_OR_LATER = isJava7OrLater; +} + /** * Protect against the memory leak caused when the first call to * sun.awt.AppContext.getAppContext() is triggered by a web - * application. Defaults to true. + * application. Defaults to true for Java 6 and earlier (since + * it is used by {@link java.beans.Introspector#flushCaches()}) but defaults + * to false for Java 7 and later since + * {@link java.beans.Introspector#flushCaches()} no longer uses AppContext + * from 1.7.0_02 onwards. Also, from 1.7.0_25 onwards, calling this method + * requires a graphical environment and starts an AWT thread. */ -private boolean appContextProtection = true; +private boolean appContextProtection = !IS_JAVA_7_OR_LATER; public boolean isAppContextProtection() { return appContextProtection; } public void setAppContextProtection(boolean appContextProtection) { this.appContextProtection = appContextProtection; @@ -250,8 +268,15 @@ public class JreMemoryLeakPreventionList * due to eventual calls to getAppContext() are: * - Google Web Toolkit via its use of javax.imageio * - Tomcat via its use of java.beans.Introspector.flushCaches() - * in 1.6.0_15 onwards + * in 1.6.0_15 to 1.7.0_01. From 1.7.0_02 onwards use of + * AppContext by Introspector.flushCaches() was replaced with + * ThreadGroupContext * - others TBD + * + * From 1.7.0_25 onwards, a call to + * sun.awt.AppContext.getAppContext() results in a thread being + * started named AWT-AppKit that requires a graphic environment + * to be available. */ // Trigger a call to sun.awt.AppContext.getAppContext(). This Modified: tomcat/trunk/webapps/docs/config/listeners.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/listeners.xml?rev=1496061&r1=1496060&r2=1496061&view=diff == --- tomcat/trunk/webapps/docs/config/listeners.xml (original) +++ tomcat/trunk/webapps/docs/config/listeners.xml Mon Jun 24 14:06:24 2013 @@ -178,9 +178,11 @@ Enables protection so that calls to sun.awt.AppContext.getAppContext() triggered by a web application do not result in a memory leak. Note that a call to this -method will be triggered as part of the web application stop process so -it is strongly recommended that this protection is enabled. The default -is true. +method will be triggered as part of the web application stop process +when running on Java 6 and earlier. It is therefore strongly recommended +that this protection is enabled when running on Java 6 and earlier. The +default is true for Java 6 and earlier versions. The +default is false for Java 7 and later versions. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496063 - in /tomcat/trunk: java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java webapps/docs/config/listeners.xml
Author: markt Date: Mon Jun 24 14:15:31 2013 New Revision: 1496063 URL: http://svn.apache.org/r1496063 Log: Tomcat 8 requires a minimum of Java 7 so simplify. Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java tomcat/trunk/webapps/docs/config/listeners.xml Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1496063&r1=1496062&r2=1496063&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Mon Jun 24 14:15:31 2013 @@ -59,30 +59,15 @@ public class JreMemoryLeakPreventionList private static final StringManager sm = StringManager.getManager(Constants.Package); -private static final boolean IS_JAVA_7_OR_LATER; - -static { -boolean isJava7OrLater; -try { -Class.forName("java.util.Objects"); -isJava7OrLater = true; -} catch (ClassNotFoundException e) { -isJava7OrLater = false; -} -IS_JAVA_7_OR_LATER = isJava7OrLater; -} - /** * Protect against the memory leak caused when the first call to * sun.awt.AppContext.getAppContext() is triggered by a web - * application. Defaults to true for Java 6 and earlier (since - * it is used by {@link java.beans.Introspector#flushCaches()}) but defaults - * to false for Java 7 and later since + * application. Defaults to false since * {@link java.beans.Introspector#flushCaches()} no longer uses AppContext * from 1.7.0_02 onwards. Also, from 1.7.0_25 onwards, calling this method * requires a graphical environment and starts an AWT thread. */ -private boolean appContextProtection = !IS_JAVA_7_OR_LATER; +private boolean appContextProtection = false; public boolean isAppContextProtection() { return appContextProtection; } public void setAppContextProtection(boolean appContextProtection) { this.appContextProtection = appContextProtection; @@ -268,7 +253,7 @@ public class JreMemoryLeakPreventionList * due to eventual calls to getAppContext() are: * - Google Web Toolkit via its use of javax.imageio * - Tomcat via its use of java.beans.Introspector.flushCaches() - * in 1.6.0_15 to 1.7.0_01. From 1.7.0_02 onwards use of + * in 1.7.0 to 1.7.0_01. From 1.7.0_02 onwards use of * AppContext by Introspector.flushCaches() was replaced with * ThreadGroupContext * - others TBD Modified: tomcat/trunk/webapps/docs/config/listeners.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/listeners.xml?rev=1496063&r1=1496062&r2=1496063&view=diff == --- tomcat/trunk/webapps/docs/config/listeners.xml (original) +++ tomcat/trunk/webapps/docs/config/listeners.xml Mon Jun 24 14:15:31 2013 @@ -177,12 +177,10 @@ Enables protection so that calls to sun.awt.AppContext.getAppContext() triggered by a web -application do not result in a memory leak. Note that a call to this -method will be triggered as part of the web application stop process -when running on Java 6 and earlier. It is therefore strongly recommended -that this protection is enabled when running on Java 6 and earlier. The -default is true for Java 6 and earlier versions. The -default is false for Java 7 and later versions. +application do not result in a memory leak. Note that enabling this +protection will trigger a requirement for a graphical environment unless +Java is started in head-less mode. The default is false. + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
mod_jk, JSESSION_ID and load-balancing
Hi to all, I'm faced a weird problem with a web application who didn't keep JSESSIONID generated by Apache Tomcat (via jvmRoute). This application is using ASF Shiro who in turn regenerate its own JSESSIONID (and replace one from Tomcat). It completly broke mod_jk/ajp load-balancing and sticky session. Did some of you allready encountered such problem ? For mod_jk, could we imagine to add support for another cookie, ie ROUTE_ID, who will be set by mod_jk and evaluated by its lb worker ? As temporary fix, I used mod_proxy like this : # JkMount /* nexus Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED BalancerMember http://nexus1.mycorp.org:8080 route=nx BalancerMember http://nexus2.mycorp.org:8080 route=nx2 ProxySet stickysession=ROUTEID ProxyPreserveHost On ProxyPass /balancer-manager ! ProxyPass / balancer://nxcluster/ SetHandler balancer-manager Order Deny,Allow Deny from all Allow from localhost BTW, I'd like to keep jk for this configuration to stay consistent with other settings. Thanks for feedbacks.
svn commit: r1496098 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java webapps/docs/changelog.xml webapps/docs/config/listeners.xml
Author: markt Date: Mon Jun 24 15:33:33 2013 New Revision: 1496098 URL: http://svn.apache.org/r1496098 Log: Changes to java.beans.Introspector#flushCaches() mean that AppContext protection is not required from 1.7.0_02 onwards. Changes to AppContext meant the memory leak protection required a graphical environment from 1.7.0_25 onwards. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1496061 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1496098&r1=1496097&r2=1496098&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Mon Jun 24 15:33:33 2013 @@ -59,12 +59,30 @@ public class JreMemoryLeakPreventionList private static final StringManager sm = StringManager.getManager(Constants.Package); +private static final boolean IS_JAVA_7_OR_LATER; + +static { +boolean isJava7OrLater; +try { +Class.forName("java.util.Objects"); +isJava7OrLater = true; +} catch (ClassNotFoundException e) { +isJava7OrLater = false; +} +IS_JAVA_7_OR_LATER = isJava7OrLater; +} + /** * Protect against the memory leak caused when the first call to * sun.awt.AppContext.getAppContext() is triggered by a web - * application. Defaults to true. + * application. Defaults to true for Java 6 and earlier (since + * it is used by {@link java.beans.Introspector#flushCaches()}) but defaults + * to false for Java 7 and later since + * {@link java.beans.Introspector#flushCaches()} no longer uses AppContext + * from 1.7.0_02 onwards. Also, from 1.7.0_25 onwards, calling this method + * requires a graphical environment and starts an AWT thread. */ -private boolean appContextProtection = true; +private boolean appContextProtection = !IS_JAVA_7_OR_LATER; public boolean isAppContextProtection() { return appContextProtection; } public void setAppContextProtection(boolean appContextProtection) { this.appContextProtection = appContextProtection; @@ -248,8 +266,15 @@ public class JreMemoryLeakPreventionList * due to eventual calls to getAppContext() are: * - Google Web Toolkit via its use of javax.imageio * - Tomcat via its use of java.beans.Introspector.flushCaches() - * in 1.6.0_15 onwards + * in 1.6.0_15 to 1.7.0_01. From 1.7.0_02 onwards use of + * AppContext by Introspector.flushCaches() was replaced with + * ThreadGroupContext * - others TBD + * + * From 1.7.0_25 onwards, a call to + * sun.awt.AppContext.getAppContext() results in a thread being + * started named AWT-AppKit that requires a graphic environment + * to be available. */ // Trigger a call to sun.awt.AppContext.getAppContext(). This Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1496098&r1=1496097&r2=1496098&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jun 24 15:33:33 2013 @@ -92,6 +92,12 @@ and when running as a service) since Tomcat will not be able to do any useful work. (markt) + +Update the JreMemoryLeakPreventionListener to take account +of changes in the behaviour of +java.beans.Introspector.flushCaches() and +sun.awt.AppContext.getAppContext() in Java 7. (markt) + Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml?rev=1496098&r1=1496097&r2=1496098&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml Mon Jun 24 15:33:33 2013 @@ -177,9 +177,11 @@ Enables protection so that
Re: svn commit: r1496061 - in /tomcat/trunk: java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java webapps/docs/config/listeners.xml
Mark, On 6/24/13 10:06 AM, ma...@apache.org wrote: > Author: markt > Date: Mon Jun 24 14:06:24 2013 > New Revision: 1496061 > > URL: http://svn.apache.org/r1496061 > Log: > Changes to java.beans.Introspector#flushCaches() mean that AppContext > protection is not required from 1.7.0_02 onwards. > Changes to AppContext meant the memory leak protection required a graphical > environment from 1.7.0_25 onwards. > > Modified: > > tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java > tomcat/trunk/webapps/docs/config/listeners.xml > > Modified: > tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1496061&r1=1496060&r2=1496061&view=diff > == > --- > tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java > (original) > +++ > tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java > Mon Jun 24 14:06:24 2013 > @@ -59,12 +59,30 @@ public class JreMemoryLeakPreventionList > private static final StringManager sm = > StringManager.getManager(Constants.Package); > > +private static final boolean IS_JAVA_7_OR_LATER; > + > +static { > +boolean isJava7OrLater; > +try { > +Class.forName("java.util.Objects"); > +isJava7OrLater = true; > +} catch (ClassNotFoundException e) { > +isJava7OrLater = false; > +} > +IS_JAVA_7_OR_LATER = isJava7OrLater; > +} Isn't there a better way to detect Java versions? Maybe detect the version string and do a comparison? -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk, JSESSION_ID and load-balancing
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Henri, This sounds more like a question for the users list. Cross-posting to re-locate. See more below... On 6/24/13 11:09 AM, Henri Gomez wrote: > Hi to all, > > I'm faced a weird problem with a web application who didn't keep > JSESSIONID generated by Apache Tomcat (via jvmRoute). > > This application is using ASF Shiro who in turn regenerate its own > JSESSIONID (and replace one from Tomcat). > > It completly broke mod_jk/ajp load-balancing and sticky session. > > Did some of you allready encountered such problem ? > > > For mod_jk, could we imagine to add support for another cookie, ie > ROUTE_ID, who will be set by mod_jk and evaluated by its lb worker > ? > > As temporary fix, I used mod_proxy like this : > > # JkMount /* nexus > > Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ ROUTE}e; path=/" > env=BALANCER_ROUTE_CHANGED > > BalancerMember > http://nexus1.mycorp.org:8080 route=nx BalancerMember > http://nexus2.mycorp.org:8080 route=nx2 ProxySet > stickysession=ROUTEID > > ProxyPreserveHost On ProxyPass /balancer-manager ! ProxyPass / > balancer://nxcluster/ > > SetHandler balancer-manager Order > Deny,Allow Deny from all Allow from localhost > > BTW, I'd like to keep jk for this configuration to stay consistent > with other settings. > > Thanks for feedbacks. Is is important to retain the original JSESSIONID, or do you only want to retain the jvmRoute information? I would think you'd want both. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRyH4nAAoJEBzwKT+lPKRY3rUQAKOpPC0GlIiE4jVDut5x5rhm pS+Lht4WPrKr1F4OSe+8T1yfMci2MPytztCupzWB4TaNK89dylX3xBJJpgnMUd8y 7FDPc0JY/6bp6H2Jd2wXJvhYFgbi/bMYvNu3xZ4QjNRMg4Ccf3/pMEQG+InkufzL l/ftKOQahztBEiFImFKgxNyVWEgwLKr2k9EKok0yNMikMEe3oGhpeJfSGx36hF84 eQeQFzDpfOQgfcUfSyY982cflQXGPigQawzQLonp9JC47grijB2O2CZVQ/DGwnBv 5QtVTE82YPH2H1t7vn/A8v48Y1ArWA/McgeT426wnNxsU0d8Cp7n4ymqInx3vwAA wEmsGJA5lBAYAqE5KLNWqIQZPL6uDZoKQG+Guf7vJZjJFirQj3bdNyFn1gyROOa4 t0ahMY9hO3QIS41Nat1KbVabJiL47XW9psr7/WQvIGMkfmu7ZsA9PLcAPBwdkJ/P Hq3merselvB8BXwgMbtVZvkzp9kCpFR9Y4rSjYyNiirtARMOvl2Gp/psE38fJGqY KevUctBoUOisAYI7/PVcu/26kJVgtJTa4R2pdnNRI/ztnpB2EO7DKYt6/lt8ghGX /7Ge0HqyPdaKVBQSu48XXtBbBku8H6PkbaJOxPw40XDGNt6qOtt1L8vHDuPCbL0s lRYoYFLS9kiLE/Y4sUsb =Bbx0 -END PGP SIGNATURE- - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496174 - /tomcat/trunk/test/org/apache/tomcat/websocket/server/TestUriTemplate.java
Author: markt Date: Mon Jun 24 19:35:24 2013 New Revision: 1496174 URL: http://svn.apache.org/r1496174 Log: Additional unit tests based on spec examples Modified: tomcat/trunk/test/org/apache/tomcat/websocket/server/TestUriTemplate.java Modified: tomcat/trunk/test/org/apache/tomcat/websocket/server/TestUriTemplate.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/server/TestUriTemplate.java?rev=1496174&r1=1496173&r2=1496174&view=diff == --- tomcat/trunk/test/org/apache/tomcat/websocket/server/TestUriTemplate.java (original) +++ tomcat/trunk/test/org/apache/tomcat/websocket/server/TestUriTemplate.java Mon Jun 24 19:35:24 2013 @@ -86,4 +86,69 @@ public class TestUriTemplate { Assert.assertEquals(0, result.size()); } + + +@Test +public void testSpecExample1_01() throws Exception { +UriTemplate t = new UriTemplate("/a/b"); +Map result = t.match(new UriTemplate("/a/b")); + +Assert.assertEquals(0, result.size()); +} + + +@Test +public void testSpecExample1_02() throws Exception { +UriTemplate t = new UriTemplate("/a/b"); +Map result = t.match(new UriTemplate("/a")); + +Assert.assertNull(result); +} + + +@Test +public void testSpecExample1_03() throws Exception { +UriTemplate t = new UriTemplate("/a/b"); +Map result = t.match(new UriTemplate("/a/bb")); + +Assert.assertNull(result); +} + + +@Test +public void testSpecExample2_01() throws Exception { +UriTemplate t = new UriTemplate("/a/{var}"); +Map result = t.match(new UriTemplate("/a/b")); + +Assert.assertEquals(1, result.size()); +Assert.assertEquals("b", result.get("var")); +} + + +@Test +public void testSpecExample2_02() throws Exception { +UriTemplate t = new UriTemplate("/a/{var}"); +Map result = t.match(new UriTemplate("/a/apple")); + +Assert.assertEquals(1, result.size()); +Assert.assertEquals("apple", result.get("var")); +} + + +@Test +public void testSpecExample2_03() throws Exception { +UriTemplate t = new UriTemplate("/a/{var}"); +Map result = t.match(new UriTemplate("/a")); + +Assert.assertNull(result); + } + + +@Test +public void testSpecExample2_04() throws Exception { +UriTemplate t = new UriTemplate("/a/{var}"); +Map result = t.match(new UriTemplate("/a/b/c")); + +Assert.assertNull(result); + } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496175 - in /tomcat/trunk/test/org/apache/tomcat/websocket/server: TestWebSocketServerContainer.java TestWsServerContainer.java
Author: markt Date: Mon Jun 24 19:36:15 2013 New Revision: 1496175 URL: http://svn.apache.org/r1496175 Log: Rename to match test case name with tested class name Added: tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java - copied, changed from r1496062, tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java Removed: tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java Copied: tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java (from r1496062, tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java?p2=tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java&p1=tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java&r1=1496062&r2=1496175&rev=1496175&view=diff == --- tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java (original) +++ tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java Mon Jun 24 19:36:15 2013 @@ -33,7 +33,7 @@ import org.apache.catalina.startup.Tomca import org.apache.tomcat.websocket.TesterEchoServer; -public class TestWebSocketServerContainer extends TomcatBaseTest { +public class TestWsServerContainer extends TomcatBaseTest { @Test public void testBug54807() throws Exception { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496184 - in /tomcat/trunk/test/org/apache: catalina/filters/TesterServletContext.java tomcat/websocket/server/TestWsServerContainer.java
Author: markt Date: Mon Jun 24 19:58:05 2013 New Revision: 1496184 URL: http://svn.apache.org/r1496184 Log: More matching tests based on spec examples. Modified: tomcat/trunk/test/org/apache/catalina/filters/TesterServletContext.java tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java Modified: tomcat/trunk/test/org/apache/catalina/filters/TesterServletContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/filters/TesterServletContext.java?rev=1496184&r1=1496183&r2=1496184&view=diff == --- tomcat/trunk/test/org/apache/catalina/filters/TesterServletContext.java (original) +++ tomcat/trunk/test/org/apache/catalina/filters/TesterServletContext.java Mon Jun 24 19:58:05 2013 @@ -36,6 +36,10 @@ import javax.servlet.SessionCookieConfig import javax.servlet.SessionTrackingMode; import javax.servlet.descriptor.JspConfigDescriptor; +import org.apache.catalina.core.ApplicationFilterRegistration; +import org.apache.catalina.core.TesterContext; +import org.apache.catalina.deploy.FilterDef; + public class TesterServletContext implements ServletContext { @Override @@ -137,8 +141,7 @@ public class TesterServletContext implem @Override public String getInitParameter(String name) { - -throw new RuntimeException("Not implemented"); +return null; } @Override @@ -236,7 +239,8 @@ public class TesterServletContext implem @Override public javax.servlet.FilterRegistration.Dynamic addFilter( String filterName, Class filterClass) { -throw new RuntimeException("Not implemented"); +return new ApplicationFilterRegistration( +new FilterDef(), new TesterContext()); } @Override Modified: tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java?rev=1496184&r1=1496183&r2=1496184&view=diff == --- tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java (original) +++ tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java Mon Jun 24 19:58:05 2013 @@ -27,6 +27,7 @@ import org.junit.Test; import org.apache.catalina.Context; import org.apache.catalina.LifecycleState; import org.apache.catalina.deploy.ApplicationListener; +import org.apache.catalina.filters.TesterServletContext; import org.apache.catalina.servlets.DefaultServlet; import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.TomcatBaseTest; @@ -72,4 +73,43 @@ public class TestWsServerContainer exten } } } + + +@Test +public void testSpecExample3() throws Exception { +WsServerContainer sc = WsServerContainer.getServerContainer(); +sc.setServletContext(new TesterServletContext()); + +ServerEndpointConfig configA = ServerEndpointConfig.Builder.create( +Object.class, "/a/{var}/c").build(); +ServerEndpointConfig configB = ServerEndpointConfig.Builder.create( +Object.class, "/a/b/c").build(); +ServerEndpointConfig configC = ServerEndpointConfig.Builder.create( +Object.class, "/a/{var1}/{var2}").build(); + +sc.addEndpoint(configA); +sc.addEndpoint(configB); +sc.addEndpoint(configC); + +Assert.assertEquals(configB, sc.findMapping("/a/b/c").getConfig()); +Assert.assertEquals(configA, sc.findMapping("/a/d/c").getConfig()); +Assert.assertEquals(configC, sc.findMapping("/a/x/y").getConfig()); +} + + +@Test +public void testSpecExample4() throws Exception { +WsServerContainer sc = WsServerContainer.getServerContainer(); +sc.setServletContext(new TesterServletContext()); + +ServerEndpointConfig configA = ServerEndpointConfig.Builder.create( +Object.class, "/{var1}/d").build(); +ServerEndpointConfig configB = ServerEndpointConfig.Builder.create( +Object.class, "/b/{var2}").build(); + +sc.addEndpoint(configA); +sc.addEndpoint(configB); + +Assert.assertEquals(configB, sc.findMapping("/b/d").getConfig()); +} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496200 - in /tomcat/trunk/java/org/apache/tomcat/websocket: Constants.java WsWebSocketContainer.java
Author: markt Date: Mon Jun 24 20:30:04 2013 New Revision: 1496200 URL: http://svn.apache.org/r1496200 Log: Clients need to send extension information Modified: tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java?rev=1496200&r1=1496199&r2=1496200&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/Constants.java Mon Jun 24 20:30:04 2013 @@ -50,6 +50,8 @@ public class Constants { public static final String WS_KEY_HEADER_NAME = "Sec-WebSocket-Key"; public static final String WS_PROTOCOL_HEADER_NAME = "Sec-WebSocket-Protocol"; +public static final String WS_EXTENSIONS_HEADER_NAME = +"Sec-WebSocket-Extensions"; private Constants() { Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1496200&r1=1496199&r2=1496200&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Mon Jun 24 20:30:04 2013 @@ -250,7 +250,8 @@ public class WsWebSocketContainer } int port = path.getPort(); Map> reqHeaders = createRequestHeaders(host, port, -clientEndpointConfiguration.getPreferredSubprotocols()); +clientEndpointConfiguration.getPreferredSubprotocols(), +clientEndpointConfiguration.getExtensions()); clientEndpointConfiguration.getConfigurator(). beforeRequest(reqHeaders); @@ -408,7 +409,7 @@ public class WsWebSocketContainer } private Map> createRequestHeaders(String host, -int port, List subProtocols) { +int port, List subProtocols, List extensions) { Map> headers = new HashMap<>(); @@ -446,10 +447,36 @@ public class WsWebSocketContainer if (subProtocols != null && subProtocols.size() > 0) { headers.put(Constants.WS_PROTOCOL_HEADER_NAME, subProtocols); } + +// WebSocket extensions +if (extensions != null && extensions.size() > 0) { +headers.put(Constants.WS_EXTENSIONS_HEADER_NAME, +generateExtensionHeaders(extensions)); +} + return headers; } +private List generateExtensionHeaders(List extensions) { +List result = new ArrayList<>(extensions.size()); +for (Extension extension : extensions) { +StringBuilder header = new StringBuilder(); +header.append(extension.getName()); +for (Extension.Parameter param : extension.getParameters()) { +header.append(';'); +header.append(param.getName()); +String value = param.getValue(); +if (value != null && value.length() > 0) { +header.append('='); +header.append(value); +} +} +} +return result; +} + + private String generateWsKeyValue() { byte[] keyBytes = new byte[16]; random.nextBytes(keyBytes); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496205 - /tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
Author: markt Date: Mon Jun 24 20:38:17 2013 New Revision: 1496205 URL: http://svn.apache.org/r1496205 Log: Remove unused value Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties?rev=1496205&r1=1496204&r2=1496205&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties Mon Jun 24 20:38:17 2013 @@ -22,8 +22,6 @@ serverContainer.pojoDeploy=POJO class [{ serverContainer.servletContextMismatch=Attempted to register a POJO annotated for WebSocket at path [{0}] in the ServletContext with context path [{1}] when the WebSocket ServerContainer is allocated to the ServletContext with context path [{2}] serverContainer.servletContextMissing=No ServletContext was specified -uriTemplate.noMatch=The input template [{0}] generated the pattern [{1}] which did not match the supplied pathInfo [{2}] - wsHttpUpgradeHandler.destroyFailed=Failed to close WebConnection while destroying the WebSocket HttpUpgradeHandler wsHttpUpgradeHandler.noPreInit=The preInit() method must be called to configure the WebSocket HttpUpgradeHandler before the container calls init(). Usually, this means the Servlet that created the WsHttpUpgradeHandler instance should also call preInit() - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496208 - in /tomcat/trunk/java/org/apache/tomcat/websocket/server: LocalStrings.properties UriTemplate.java
Author: markt Date: Mon Jun 24 20:41:16 2013 New Revision: 1496208 URL: http://svn.apache.org/r1496208 Log: Fix an i18n TODO Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/websocket/server/UriTemplate.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties?rev=1496208&r1=1496207&r2=1496208&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties Mon Jun 24 20:41:16 2013 @@ -22,6 +22,8 @@ serverContainer.pojoDeploy=POJO class [{ serverContainer.servletContextMismatch=Attempted to register a POJO annotated for WebSocket at path [{0}] in the ServletContext with context path [{1}] when the WebSocket ServerContainer is allocated to the ServletContext with context path [{2}] serverContainer.servletContextMissing=No ServletContext was specified +uriTemplate.invalidSegment=The segment [{0}] is not valid in the provided path [{1}] + wsHttpUpgradeHandler.destroyFailed=Failed to close WebConnection while destroying the WebSocket HttpUpgradeHandler wsHttpUpgradeHandler.noPreInit=The preInit() method must be called to configure the WebSocket HttpUpgradeHandler before the container calls init(). Usually, this means the Servlet that created the WsHttpUpgradeHandler instance should also call preInit() Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/UriTemplate.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/UriTemplate.java?rev=1496208&r1=1496207&r2=1496208&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/server/UriTemplate.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/server/UriTemplate.java Mon Jun 24 20:41:16 2013 @@ -22,12 +22,17 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import org.apache.tomcat.util.res.StringManager; + /** * Extracts path parameters from URIs used to create web socket connections * using the URI template defined for the associated Endpoint. */ public class UriTemplate { +private static final StringManager sm = +StringManager.getManager(Constants.PACKAGE_NAME); + private final String normalized; private final List segments = new ArrayList<>(); private final boolean hasParameters; @@ -55,8 +60,8 @@ public class UriTemplate { normalized.append('}'); } else { if (segment.contains("{") || segment.contains("}")) { -// TODO i18n -throw new IllegalArgumentException(); +throw new IllegalArgumentException(sm.getString( +"uriTemplate.invalidSegment", segment, path)); } normalized.append(segment); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496210 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
Author: markt Date: Mon Jun 24 20:45:13 2013 New Revision: 1496210 URL: http://svn.apache.org/r1496210 Log: Remove the TCK hack. I no longer have access to the preview of the WebSocket TCK. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1496210&r1=1496209&r2=1496210&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Mon Jun 24 20:45:13 2013 @@ -55,7 +55,6 @@ import javax.net.ssl.SSLException; import javax.net.ssl.TrustManagerFactory; import javax.websocket.ClientEndpoint; import javax.websocket.ClientEndpointConfig; -import javax.websocket.ClientEndpointConfig.Builder; import javax.websocket.DeploymentException; import javax.websocket.Endpoint; import javax.websocket.Extension; @@ -181,24 +180,10 @@ public class WsWebSocketContainer } -@SuppressWarnings("unchecked") @Override public Session connectToServer(Class annotatedEndpointClass, URI path) throws DeploymentException { -// TODO: Remove this before release -/* - * This is a temporary hack to allow the WebSocket EA TCK to work. This - * has been confirmed as non-compliant with the EG lead so the TCK will - * have to change. For now, we need the TCK to work. - */ -if (Endpoint.class.isAssignableFrom(annotatedEndpointClass)) { -return connectToServer( -(Class) annotatedEndpointClass, -Builder.create().build(), path); -} -// End of TCK hack - Object pojo; try { pojo = annotatedEndpointClass.newInstance(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: mod_jk, JSESSION_ID and load-balancing
Hello Henri, On 24.06.2013 17:09, Henri Gomez wrote: > I'm faced a weird problem with a web application who didn't keep JSESSIONID > generated by Apache Tomcat (via jvmRoute). > > This application is using ASF Shiro who in turn regenerate its own > JSESSIONID (and replace one from Tomcat). > > It completly broke mod_jk/ajp load-balancing and sticky session. > > Did some of you allready encountered such problem ? > > > For mod_jk, could we imagine to add support for another cookie, ie > ROUTE_ID, who will be set by mod_jk and evaluated by its lb worker ? > > As temporary fix, I used mod_proxy like this : > ># JkMount /* nexus > >Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ > ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED > > > BalancerMember http://nexus1.mycorp.org:8080 route=nx > BalancerMember http://nexus2.mycorp.org:8080 route=nx2 > ProxySet stickysession=ROUTEID > > > ProxyPreserveHost On > ProxyPass /balancer-manager ! > ProxyPass / balancer://nxcluster/ > > > SetHandler balancer-manager > Order Deny,Allow > Deny from all > Allow from localhost > > > BTW, I'd like to keep jk for this configuration to stay consistent with > other settings. It seems Shiro recommend to extend https://svn.apache.org/viewvc/shiro/trunk/web/src/main/java/org/apache/shiro/web/session/mgt/DefaultWebSessionManager.java in order to add the needed suffix to a new id when creating a session cookie and to subtract it before forwarding the id to the shiro internals. Some of the things you need are already implemented in recent mod_jk: Strategy 1: You can let mod_jk know about using another cookie by setting the worker load balancer attribute "session_cookie" e.g. to "mycookie". You might also want to change session_path to something non-standard such that an occasional path encoding with the busted session id doesn't interfere with mod_jk. See "session_cookie" and "session_path" in http://tomcat.apache.org/connectors-doc/reference/workers.html. Strategy 2: Directly set the route with Apache means into the Apache environment variable JK_ROUTE. See "JK_ROUTE" in http://tomcat.apache.org/connectors-doc/reference/apache.html. The problem is how to set the cookie. You could do it using a servlet filter on the Tomcat side. Such a simple filter could be added to the webapp, without the need of changing the webapp sources. The filter is independent and would just be added to web.xml and the WEB-INF/lib. Letting mod_jk itself set the cookie could be a nice addition, because it would be easy for it to do. It knows the correct route name, whether the cookie was already received with the request and whether a failover happened. Would be easy to add. The configuration would need to wire the "HttpOnly" and "Secure" flags for the cookie. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1496247 - in /tomcat/trunk/java/org/apache/tomcat/websocket: AsyncChannelWrapperSecure.java LocalStrings.properties
Author: markt Date: Mon Jun 24 22:46:38 2013 New Revision: 1496247 URL: http://svn.apache.org/r1496247 Log: Remaining i18n TODOs in WebSocket impl Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1496247&r1=1496246&r2=1496247&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java Mon Jun 24 22:46:38 2013 @@ -36,12 +36,21 @@ import javax.net.ssl.SSLEngineResult.Han import javax.net.ssl.SSLEngineResult.Status; import javax.net.ssl.SSLException; +import org.apache.juli.logging.Log; +import org.apache.juli.logging.LogFactory; +import org.apache.tomcat.util.res.StringManager; + /** * Wraps the {@link AsynchronousSocketChannel} with SSL/TLS. This needs a lot * more testing before it can be considered robust. */ public class AsyncChannelWrapperSecure implements AsyncChannelWrapper { +private static final Log log = +LogFactory.getLog(AsyncChannelWrapperSecure.class); +private static final StringManager sm = +StringManager.getManager(Constants.PACKAGE_NAME); + private static final ByteBuffer DUMMY = ByteBuffer.allocate(8192); private final AsynchronousSocketChannel socketChannel; private final SSLEngine sslEngine; @@ -67,8 +76,8 @@ public class AsyncChannelWrapperSecure i WrapperFuture future = new WrapperFuture<>(); if (!reading.compareAndSet(false, true)) { -// TODO -throw new IllegalStateException(); +throw new IllegalStateException(sm.getString( +"asyncChannelWrapperSecure.concurrentRead")); } ReadTask readTask = new ReadTask(dst, future); @@ -86,8 +95,8 @@ public class AsyncChannelWrapperSecure i new WrapperFuture<>(handler, attachment); if (!reading.compareAndSet(false, true)) { -// TODO -throw new IllegalStateException(); +throw new IllegalStateException(sm.getString( +"asyncChannelWrapperSecure.concurrentRead")); } ReadTask readTask = new ReadTask(dst, future); @@ -101,8 +110,8 @@ public class AsyncChannelWrapperSecure i WrapperFuture inner = new WrapperFuture<>(); if (!writing.compareAndSet(false, true)) { -// TODO -throw new IllegalStateException(); +throw new IllegalStateException(sm.getString( +"asyncChannelWrapperSecure.concurrentWrite")); } WriteTask writeTask = @@ -123,8 +132,8 @@ public class AsyncChannelWrapperSecure i new WrapperFuture<>(handler, attachment); if (!writing.compareAndSet(false, true)) { -// TODO -throw new IllegalStateException(); +throw new IllegalStateException(sm.getString( +"asyncChannelWrapperSecure.concurrentWrite")); } WriteTask writeTask = new WriteTask(srcs, offset, length, future); @@ -137,7 +146,7 @@ public class AsyncChannelWrapperSecure i try { socketChannel.close(); } catch (IOException e) { -// TODO +log.info(sm.getString("asyncChannelWrapperSecure.closeFail")); } } @@ -189,8 +198,8 @@ public class AsyncChannelWrapperSecure i } else { // Status.BUFFER_UNDERFLOW - only happens on unwrap // Status.CLOSED - unexpected -// TODO -throw new IllegalStateException(); +throw new IllegalStateException(sm.getString( +"asyncChannelWrapperSecure.statusWrap")); } // Check for tasks @@ -208,7 +217,10 @@ public class AsyncChannelWrapperSecure i Future f = socketChannel.write(socketWriteBuffer); Integer socketWrite = f.get(); if (socketWrite.intValue() != r.bytesProduced()) { -throw new IOException(); +throw new IOException(sm.getString( +"asyncChannelWrapperSecure.writeFail", +Integer.valueOf(socketWrite.intValue()), +Integer.valueOf(r.bytesProduced(; } } } @@ -217,8 +229,8 @@ public cla
[Bug 54693] Add a validationQueryTimeout property
https://issues.apache.org/bugzilla/show_bug.cgi?id=54693 --- Comment #7 from Rob Dunn --- Any idea when this will be released ? Thanks Rob -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55134] New: Application is crashed when user runs the stress with 600 users
https://issues.apache.org/bugzilla/show_bug.cgi?id=55134 Bug ID: 55134 Summary: Application is crashed when user runs the stress with 600 users Product: Tomcat Native Version: 1.1.2 Hardware: DEC OS: Windows XP Status: NEW Severity: critical Priority: P2 Component: Documentation Assignee: dev@tomcat.apache.org Reporter: manoj.vasala...@gmail.com 11:22 BI Validator application is crashing, when user runs the stress test plan with 600 users. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55134] Application is crashed when user runs the stress with 600 users
https://issues.apache.org/bugzilla/show_bug.cgi?id=55134 --- Comment #1 from Manoj --- Same issue if user runs the stress with more than 600 users. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54693] Add a validationQueryTimeout property
https://issues.apache.org/bugzilla/show_bug.cgi?id=54693 --- Comment #8 from Rob Dunn --- Any idea when this will be released ? Thanks Rob -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55134] Application is crashed when user runs the stress with 600 users
https://issues.apache.org/bugzilla/show_bug.cgi?id=55134 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: mod_jk, JSESSION_ID and load-balancing
>Henri, > This sounds more like a question for the users list. Cross-posting to > re-locate. See more below... I used dev list because question was also about updating mod_jk code. >Is is important to retain the original JSESSIONID, or do you only want >to retain the jvmRoute information? I would think you'd want both. jvmRoute should be kept in JSESSIONID as mod_jk load-balancing use it to dispatch requests to proper Tomcat :)