[Bug 53507] New: javax.servlet.ServletException: java.lang.Error: Unresolved compilation problem
https://issues.apache.org/bugzilla/show_bug.cgi?id=53507 Priority: P2 Bug ID: 53507 Assignee: dev@tomcat.apache.org Summary: javax.servlet.ServletException: java.lang.Error: Unresolved compilation problem Severity: normal Classification: Unclassified Reporter: saran_arju...@yahoo.co.in Hardware: PC Status: NEW Version: 6.0.35 Component: Catalina Product: Tomcat 6 HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: java.lang.Error: Unresolved compilation problem: org.apache.jasper.servlet.JspServlet.service(JspServlet.java:268) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.eg.EgAccessFilter.doFilter(EgAccessFilter.java:59) root cause java.lang.Error: Unresolved compilation problem: org.apache.jsp.monitor.egSystemAnalysis_jsp._jspService(egSystemAnalysis_jsp.java:74) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.eg.EgAccessFilter.doFilter(EgAccessFilter.java:59) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.35 logs. -- 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: [VOTE] Release Apache Tomcat 7.0.29
On 07/03/2012 01:30 PM, Mark Thomas wrote: The proposed 7.0.29 release is: [ ] Broken - do not release [X] Stable - go ahead and release as 7.0.29 Stable - Tested on Linux and Windows - Signatures OK Regards -- ^TM - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.29
+1 tested maven artifacts with the maven plugin and on various projects. 2012/7/3 Mark Thomas : > The proposed Apache Tomcat 7.0.29 release is now available for voting. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.29/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-014/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_29/ > > The proposed 7.0.29 release is: > [ ] Broken - do not release > [ ] Stable - go ahead and release as 7.0.29 Stable > > Cheers, > > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > -- Olivier Lamy Talend: http://coders.talend.com 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
[Bug 53504] jstl.jar not scanned for TLDs
https://issues.apache.org/bugzilla/show_bug.cgi?id=53504 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #1 from Mark Thomas --- jstl.jar is still in widespread usage. If you are going to rename JARs then you have to expect to deal with the consequences. -- 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 53507] javax.servlet.ServletException: java.lang.Error: Unresolved compilation problem
https://issues.apache.org/bugzilla/show_bug.cgi?id=53507 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID OS||All --- Comment #1 from Mark Thomas --- Bugzilla is not a support forum. Read this: http://www.catb.org/~esr/faqs/smart-questions.html Then try again via the users mailing list. -- 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
svn commit: r1357394 - /tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
Author: markt Date: Wed Jul 4 20:35:34 2012 New Revision: 1357394 URL: http://svn.apache.org/viewvc?rev=1357394&view=rev Log: Tweak the async state diagram: - add method names - re-arrange some of the lines for clarity - document the new state Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1357394&r1=1357393&r2=1357394&view=diff == --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java (original) +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java Wed Jul 4 20:35:34 2012 @@ -34,6 +34,7 @@ import org.apache.tomcat.util.res.String * STARTED - ServletRequest.startAsync() has been called and the * request in which that call was made has finished * processing. + * READ_WRITE_OP - Performing an asynchronous read or write. * MUST_COMPLETE - complete() has been called before the request in which * ServletRequest.startAsync() has finished. As soon as that * request finishes, the complete() will be processed. @@ -51,37 +52,41 @@ import org.apache.tomcat.util.res.String * * |->--| * | \|/ - * | |--<---ERROR - * | |complete() /|\ |postProcess() - * | | error()| | - * | | | | |--|timeout() - * | | postProcess() | \|/ | \|/auto - * | | |--->DISPATCHED<--COMPLETING<| - * | | | /|\ | | /|\| - * | | ||--->---| | |--| | - * | | ^| |startAsync()timeout() | - * | | || | | - * | \|/|| complete() \|/postProcess() | - * | MUST_COMPLETE-<- | <--STARTING-->| ^ - * | /|\ | | | | - * | | | | | | - * | | ^ |dispatch() | | - * | | | | | | - * | | | \|/ \|/ complete() | - * | | | MUST_DISPATCH STARTED>---| - * | | | | | | \ \ - * | | | |postProcess()| | \ \ - * ^ ^ | | dispatch() | |auto\ \ - * | | | ||| | \ \<-- - * | | | auto \|/ \|/ \|/ \ \ - * | | |---- - * | complete() \---|--| - * | | | - * |<<-<--|--| - * error() + * | |--<---ERROR---<--| + * | | complete() /|\ | | + * | | | |postProcess() | + * | | error()| | | + * | | | | |--|timeout() | + * | | postProcess() | \|/ | \|/auto | + * | | |--->DISPATCHED<---COMPLETING<-| | + * | | | /|\ | | /|\ || + * | | ||--->---| | |--| || + * | | ^| |startAsync() timeout() || + * | | || | || + * | \|/|| complete() \|/postProcess() || + * | MUST_COMPLETE-<-
svn commit: r1357395 - /tomcat/trunk/webapps/docs/monitoring.xml
Author: markt Date: Wed Jul 4 20:36:37 2012 New Revision: 1357395 URL: http://svn.apache.org/viewvc?rev=1357395&view=rev Log: Whitespace police Modified: tomcat/trunk/webapps/docs/monitoring.xml Modified: tomcat/trunk/webapps/docs/monitoring.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/monitoring.xml?rev=1357395&r1=1357394&r2=1357395&view=diff == --- tomcat/trunk/webapps/docs/monitoring.xml (original) +++ tomcat/trunk/webapps/docs/monitoring.xml Wed Jul 4 20:36:37 2012 @@ -1134,7 +1134,7 @@ Wait for server connection and that clus Tomcat's JMXProxyServlet. - + The JMXProxyServlet allows a client to issue JMX queries via an HTTP interface. This technique offers the following advantages over using @@ -1157,10 +1157,10 @@ Wait for server connection and that clus connections, and then shut them all down every few minutes. With the JMXProxyServlet, you can make 10 HTTP connections and be done with it. - + You can find out more information about the JMXProxyServlet in the - documentation for the + documentation for the Tomcat manager. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1357396 - /tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
Author: markt Date: Wed Jul 4 20:37:24 2012 New Revision: 1357396 URL: http://svn.apache.org/viewvc?rev=1357396&view=rev Log: Remove unused imports. Fix import order. Modified: tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java Modified: tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java?rev=1357396&r1=1357395&r2=1357396&view=diff == --- tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java (original) +++ tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java Wed Jul 4 20:37:24 2012 @@ -17,9 +17,6 @@ package org.apache.catalina.nonblocking; import java.io.IOException; -import java.io.Reader; -import java.nio.charset.Charset; -import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -31,12 +28,14 @@ import javax.servlet.AsyncListener; import javax.servlet.ReadListener; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; -import javax.servlet.ServletOutputStream; import javax.servlet.WriteListener; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.junit.Assert; +import org.junit.Test; + import org.apache.catalina.Wrapper; import org.apache.catalina.core.StandardContext; import org.apache.catalina.startup.BytesStreamer; @@ -45,9 +44,6 @@ import org.apache.catalina.startup.Tomca import org.apache.catalina.startup.TomcatBaseTest; import org.apache.coyote.http11.Http11NioProtocol; import org.apache.tomcat.util.buf.ByteChunk; -import org.junit.Assert; -import org.junit.Test; - public class TestNonBlockingAPI extends TomcatBaseTest { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1357397 - in /tomcat/trunk/res: checkstyle/org-import-control.xml maven/tomcat-coyote.pom
Author: markt Date: Wed Jul 4 20:42:11 2012 New Revision: 1357397 URL: http://svn.apache.org/viewvc?rev=1357397&view=rev Log: o.a.coyote now depends on javax.servlet Modified: tomcat/trunk/res/checkstyle/org-import-control.xml tomcat/trunk/res/maven/tomcat-coyote.pom Modified: tomcat/trunk/res/checkstyle/org-import-control.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/res/checkstyle/org-import-control.xml?rev=1357397&r1=1357396&r2=1357397&view=diff == --- tomcat/trunk/res/checkstyle/org-import-control.xml (original) +++ tomcat/trunk/res/checkstyle/org-import-control.xml Wed Jul 4 20:42:11 2012 @@ -79,6 +79,7 @@ + Modified: tomcat/trunk/res/maven/tomcat-coyote.pom URL: http://svn.apache.org/viewvc/tomcat/trunk/res/maven/tomcat-coyote.pom?rev=1357397&r1=1357396&r2=1357397&view=diff == --- tomcat/trunk/res/maven/tomcat-coyote.pom (original) +++ tomcat/trunk/res/maven/tomcat-coyote.pom Wed Jul 4 20:42:11 2012 @@ -32,6 +32,12 @@ org.apache.tomcat + tomcat-servlet-api + @MAVEN.DEPLOY.VERSION@ + compile + + + org.apache.tomcat tomcat-jni @MAVEN.DEPLOY.VERSION@ compile - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1357398 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/valves/ErrorReportValve.java webapps/docs/changelog.xml
Author: markt Date: Wed Jul 4 20:47:31 2012 New Revision: 1357398 URL: http://svn.apache.org/viewvc?rev=1357398&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53071 Use the message from the Throwable for the error report if none was specified via sendError() Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1357398&r1=1357397&r2=1357398&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jul 4 20:47:31 2012 @@ -137,13 +137,6 @@ PATCHES PROPOSED TO BACKPORT: in config/realm.html) -1: -* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53071 - Use the message from the Throwable for the error report if none was specified - via sendError() - http://people.apache.org/~markt/patches/2012-06-11-bug53071-tc6.patch - +1: markt, kfujino, kkolinko - -1: - PATCHES/ISSUES THAT ARE STALLED Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1357398&r1=1357397&r2=1357398&view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java Wed Jul 4 20:47:31 2012 @@ -159,9 +159,15 @@ public class ErrorReportValve return; String message = RequestUtil.filter(response.getMessage()); -if (message == null) -message = ""; - +if (message == null) { +if (throwable != null) { +message = RequestUtil.filter(throwable.getMessage()); +} +if (message == null) { +message = ""; +} +} + // Do nothing if there is no report for the specified status code String report = null; try { Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1357398&r1=1357397&r2=1357398&view=diff == --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Jul 4 20:47:31 2012 @@ -154,6 +154,11 @@ 53057: Add OpenSSL version number INFO log message when initializing. (schultz) + +53071: Use the message from the Throwable for the error +report generated by the ErrorReportValve if none was +specified via sendError(). (markt) + 53230: Change session managers to throw TooManyActiveSessionsException instead of IllegalStateException - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53071] ErrorReportValve ignores message from throwable
https://issues.apache.org/bugzilla/show_bug.cgi?id=53071 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #10 from Mark Thomas --- Fixed in 6.0.x and will be included in 6.0.36 onwards. -- 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
svn commit: r1357401 - /tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml
Author: markt Date: Wed Jul 4 20:53:06 2012 New Revision: 1357401 URL: http://svn.apache.org/viewvc?rev=1357401&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53505 Update JSTL version info Modified: tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml Modified: tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml?rev=1357401&r1=1357400&r2=1357401&view=diff == --- tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml (original) +++ tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml Wed Jul 4 20:53:06 2012 @@ -339,8 +339,8 @@ select id, foo, bar from testdata That JSP page makes use of http://java.sun.com/products/jsp/jstl";>JSTL's SQL and Core taglibs. You can get it from http://tomcat.apache.org/taglibs/standard/";>Apache Tomcat Taglibs - Standard Tag Library -project — just make sure you get a 1.1.x release. Once you have JSTL, -copy jstl.jar and standard.jar to your web app's +project — just make sure you get a 1.1.x or later release. Once you have +JSTL, copy jstl.jar and standard.jar to your web app's WEB-INF/lib directory. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1357403 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/changelog.xml webapps/docs/jndi-datasource-examples-howto.xml
Author: markt Date: Wed Jul 4 20:55:05 2012 New Revision: 1357403 URL: http://svn.apache.org/viewvc?rev=1357403&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53505 Update JSTL version info Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml tomcat/tc7.0.x/trunk/webapps/docs/jndi-datasource-examples-howto.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1357401 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=1357403&r1=1357402&r2=1357403&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Jul 4 20:55:05 2012 @@ -64,6 +64,14 @@ + + + +Update JSTL version information in the JNDI section of the documentation +web application. (markt) + + + Modified: tomcat/tc7.0.x/trunk/webapps/docs/jndi-datasource-examples-howto.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/jndi-datasource-examples-howto.xml?rev=1357403&r1=1357402&r2=1357403&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/jndi-datasource-examples-howto.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/jndi-datasource-examples-howto.xml Wed Jul 4 20:55:05 2012 @@ -339,8 +339,8 @@ select id, foo, bar from testdata That JSP page makes use of http://java.sun.com/products/jsp/jstl";>JSTL's SQL and Core taglibs. You can get it from http://tomcat.apache.org/taglibs/standard/";>Apache Tomcat Taglibs - Standard Tag Library -project — just make sure you get a 1.1.x release. Once you have JSTL, -copy jstl.jar and standard.jar to your web app's +project — just make sure you get a 1.1.x or later release. Once you have +JSTL, copy jstl.jar and standard.jar to your web app's WEB-INF/lib directory. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53505] Documentation specifies to use old JSTL version
https://issues.apache.org/bugzilla/show_bug.cgi?id=53505 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- Fixed in trunk and 7.0.x and will be included in 7.0.30 onwards. -- 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
[Tomcat Wiki] Update of "FAQ" by ChristopherSchultz
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "FAQ" page has been changed by ChristopherSchultz: http://wiki.apache.org/tomcat/FAQ?action=diff&rev1=56&rev2=57 * [[/Memory|Memory]] - Common memory related questions. * [[/About|Meta]] - About Tomcat and this FAQ. * [[/Miscellaneous|Miscellaneous]] - Miscellaneous questions that weren't categorized. + * [[/Monitoring|Monitoring]] - Tips on Monitoring a running Tomcat instance. * [[/Other_Operating_Systems|Other Operating Systems]] - Information about scripts and support for other operating systems. * [[UsefulLinks|Other Resources]] - A lot of links to tomcat related documentation and experiences. * [[/Performance_and_Monitoring|Performance & Monitoring]] - Performance & Monitoring questions. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1357407 - in /tomcat/trunk/java/org/apache/catalina: core/ApplicationContext.java ha/context/ReplicatedContext.java
Author: markt Date: Wed Jul 4 21:03:46 2012 New Revision: 1357407 URL: http://svn.apache.org/viewvc?rev=1357407&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53498 Fix atomicity bugs in use of concurrent collections. Based on a patch by Yu Lin. Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java tomcat/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1357407&r1=1357406&r2=1357407&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Wed Jul 4 21:03:46 2012 @@ -169,7 +169,7 @@ public class ApplicationContext /** * The merged context initialization parameters for this Context. */ -private Map parameters = +private final ConcurrentHashMap parameters = new ConcurrentHashMap(); @@ -737,17 +737,14 @@ public class ApplicationContext public void removeAttribute(String name) { Object value = null; -boolean found = false; // Remove the specified attribute // Check for read only attribute -if (readOnlyAttributes.containsKey(name)) +if (readOnlyAttributes.containsKey(name)){ return; -found = attributes.containsKey(name); -if (found) { -value = attributes.get(name); -attributes.remove(name); -} else { +} +value = attributes.remove(name); +if (value == null) { return; } @@ -1244,12 +1241,7 @@ public class ApplicationContext @Override public boolean setInitParameter(String name, String value) { -if (parameters.containsKey(name)) { -return false; -} - -parameters.put(name, value); -return true; +return parameters.putIfAbsent(name, value) == null; } Modified: tomcat/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java?rev=1357407&r1=1357406&r2=1357407&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java Wed Jul 4 21:03:46 2012 @@ -170,10 +170,12 @@ public class ReplicatedContext extends S @Override public Object getAttribute(String name) { -if (tomcatAttributes.containsKey(name) ) -return tomcatAttributes.get(name); -else +Object obj = tomcatAttributes.get(name); +if (obj == null) { return super.getAttribute(name); +} else { +return obj; +} } @SuppressWarnings("unchecked") - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1357410 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ApplicationContext.java java/org/apache/catalina/ha/context/ReplicatedContext.java webapps/docs/changelog.xml
Author: markt Date: Wed Jul 4 21:10:48 2012 New Revision: 1357410 URL: http://svn.apache.org/viewvc?rev=1357410&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53498 Fix atomicity bugs in use of concurrent collections. Based on a patch by Yu Lin. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1357407 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1357410&r1=1357409&r2=1357410&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java Wed Jul 4 21:10:48 2012 @@ -169,7 +169,7 @@ public class ApplicationContext /** * The merged context initialization parameters for this Context. */ -private Map parameters = +private final ConcurrentHashMap parameters = new ConcurrentHashMap(); @@ -753,17 +753,14 @@ public class ApplicationContext public void removeAttribute(String name) { Object value = null; -boolean found = false; // Remove the specified attribute // Check for read only attribute -if (readOnlyAttributes.containsKey(name)) +if (readOnlyAttributes.containsKey(name)){ return; -found = attributes.containsKey(name); -if (found) { -value = attributes.get(name); -attributes.remove(name); -} else { +} +value = attributes.remove(name); +if (value == null) { return; } @@ -1260,12 +1257,7 @@ public class ApplicationContext @Override public boolean setInitParameter(String name, String value) { -if (parameters.containsKey(name)) { -return false; -} - -parameters.put(name, value); -return true; +return parameters.putIfAbsent(name, value) == null; } Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java?rev=1357410&r1=1357409&r2=1357410&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java Wed Jul 4 21:10:48 2012 @@ -168,10 +168,12 @@ public class ReplicatedContext extends S @Override public Object getAttribute(String name) { -if (tomcatAttributes.containsKey(name) ) -return tomcatAttributes.get(name); -else +Object obj = tomcatAttributes.get(name); +if (obj == null) { return super.getAttribute(name); +} else { +return obj; +} } @SuppressWarnings("unchecked") 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=1357410&r1=1357409&r2=1357410&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Jul 4 21:10:48 2012 @@ -62,6 +62,10 @@ file-size-threshold option in web.xml) when request processing completes. (kkolinko) + +53498: Fix atomicity bugs in use of concurrent collections. +Based on a patch by Yu Lin. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53498] Atomicity violation bugs because of misusing concurrent collections
https://issues.apache.org/bugzilla/show_bug.cgi?id=53498 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Mark Thomas --- Many thanks for the analysis and patch. The first three issues look valid on initial inspection although I suspect a closer analysis will show that not all of them are valid due to broader constraints that mean the code is, in reality, single threaded. Regardless, these three are fixed in trunk and 7.0.x and will be included in 7.0.30 onwards. I used the provided patch as a starting point although I did make some changes to make the code a little cleaner. The fourth issue is definitely not valid since a Host will never permit multiple children with the same name. This change was not included in the fix. -- 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
[Tomcat Wiki] Update of "FAQ/Monitoring" by ChristopherSchultz
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "FAQ/Monitoring" page has been changed by ChristopherSchultz: http://wiki.apache.org/tomcat/FAQ/Monitoring New page: Monitoring of a running Tomcat instance can be done in several ways, but observing a Tomcat instance via JMX beans will give you the best information available through standard interfaces (i.e. JMX). You can find information about [http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html|connecting to Tomcat via JMX] in the Tomcat Users' Guide. Rather than repeating that information here (which is mostly about configuration, connection, etc.), please go read the official documentation. This page is intended to be a community-curated collection of useful JMX beans that may be useful to you ''after'' you have made your JMX connection and want to observe interesting data through Tomcat's (and other) JMX beans. == JVM Memory Information == You will certainly want to inspect your JVM's memory usage. Here are some JMX beans and attributes that can be used to do so. JMX Bean: java.lang:type=Memory Attribute: HeapMemoryUsage The attribute value is a javax.management.openmbean.CompositeData which contains 4 keys: committed, init, max, and used. The 'used' key is probably the most useful (or a combination of 'used' / 'max' to get a memory-usage metric as a ratio). JMX Bean: java.lang:type=MemoryPool,name=CMS Perm Gen Attribute: Usage Similar to the HeapMemoryUsage MXBean described above, this one will give you information about the "PermGen" heap generation. Depending upon your garbage collection and other memory settings, you might have different MXBeans under java.lang:type=MemoryPool with different names. You should inspect each one to determine if they would be useful for you to inspect. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1357412 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/ha/session/ java/org/apache/catalina/loader/ java/org/apache/catalina/mbeans/
Author: markt Date: Wed Jul 4 21:20:46 2012 New Revision: 1357412 URL: http://svn.apache.org/viewvc?rev=1357412&view=rev Log: Move Resources and Loader from Container to Context Modified: tomcat/trunk/java/org/apache/catalina/Container.java tomcat/trunk/java/org/apache/catalina/Context.java tomcat/trunk/java/org/apache/catalina/Loader.java tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java tomcat/trunk/java/org/apache/catalina/session/FileStore.java tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java tomcat/trunk/java/org/apache/catalina/session/StandardManager.java tomcat/trunk/java/org/apache/catalina/util/Introspection.java tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java tomcat/trunk/test/org/apache/catalina/startup/TestContextConfigAnnotation.java Modified: tomcat/trunk/java/org/apache/catalina/Container.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Container.java?rev=1357412&r1=1357411&r2=1357412&view=diff == --- tomcat/trunk/java/org/apache/catalina/Container.java (original) +++ tomcat/trunk/java/org/apache/catalina/Container.java Wed Jul 4 21:20:46 2012 @@ -20,7 +20,6 @@ import java.beans.PropertyChangeListener import java.io.File; import javax.management.ObjectName; -import javax.naming.directory.DirContext; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; @@ -115,22 +114,6 @@ public interface Container extends Lifec // - Properties /** - * Return the Loader with which this Container is associated. If there is - * no associated Loader, return the Loader associated with our parent - * Container (if any); otherwise, return null. - */ -public Loader getLoader(); - - -/** - * Set the Loader with which this Container is associated. - * - * @param loader The newly associated loader - */ -public void setLoader(Loader loader); - - -/** * Return the Logger with which this Container is associated. If there is * no associated Logger, return the Logger associated with our parent * Container (if any); otherwise return null. @@ -300,22 +283,6 @@ public interface Container extends Lifec public void setRealm(Realm realm); -/** - * Return the Resources with which this Container is associated. If there - * is no associated Resources object, return the Resources associated with - * our parent Container (if any); otherwise return null. - */ -public DirContext getResources(); - - -/** - * Set the Resources object with which this Container is associated. - * - * @param resources The newly associated Resources - */ -public void setResources(DirContext resources); - - // - Public Methods Modified: tomcat/trunk/java/org/apache/catalina/Context.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1357412&r1=1357411&r2=1357412&view=diff == --- tomcat/trunk/java/org/apache/catalina/Context.java (original) +++ tomcat/trunk/java/org/apache/catalina/Context.java Wed Jul 4 21:20:46 2012 @@ -20,6 +20,7 @@ import java.net.URL; import java.util.Locale; import java.util.Set; +import javax.naming.directory.DirContext; import javax.servlet.ServletContainerInitializer; import javax.servlet.ServletContext; import javax.servlet.ServletRegistration; @@ -1387,5 +1388,29 @@ public interface Context extends Contain * part of a redirect response. */ public boolean getSendRedirectBody(); + +/** + * Return the Loader with which this Context is associated. + */ +public Loader getLoader(); + +/** + * Set the Loader with which this Context is associated. + * + * @param loader The newly associated loader + */ +public void setLoader(Loader loader); + +/** + * Return the Resources with which this Context is associated. + */ +public DirContext getResources(); + +/** + * Set the Resources object with which this Context is associated. + * + * @param resources The newly associated Resources
svn commit: r1357413 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/mbeans/ test/org/apache/catalina/startup/
Author: markt Date: Wed Jul 4 21:22:03 2012 New Revision: 1357413 URL: http://svn.apache.org/viewvc?rev=1357413&view=rev Log: Move Manager from Container to Context Modified: tomcat/trunk/java/org/apache/catalina/Container.java tomcat/trunk/java/org/apache/catalina/Context.java tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/core/LocalStrings_es.properties tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/catalina/mbeans/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Modified: tomcat/trunk/java/org/apache/catalina/Container.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Container.java?rev=1357413&r1=1357412&r2=1357413&view=diff == --- tomcat/trunk/java/org/apache/catalina/Container.java (original) +++ tomcat/trunk/java/org/apache/catalina/Container.java Wed Jul 4 21:22:03 2012 @@ -122,22 +122,6 @@ public interface Container extends Lifec /** - * Return the Manager with which this Container is associated. If there is - * no associated Manager, return the Manager associated with our parent - * Container (if any); otherwise return null. - */ -public Manager getManager(); - - -/** - * Set the Manager with which this Container is associated. - * - * @param manager The newly associated Manager - */ -public void setManager(Manager manager); - - -/** * Return the JMX name associated with this container. */ public ObjectName getObjectName(); Modified: tomcat/trunk/java/org/apache/catalina/Context.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1357413&r1=1357412&r2=1357413&view=diff == --- tomcat/trunk/java/org/apache/catalina/Context.java (original) +++ tomcat/trunk/java/org/apache/catalina/Context.java Wed Jul 4 21:22:03 2012 @@ -1412,5 +1412,19 @@ public interface Context extends Contain * @param resources The newly associated Resources */ public void setResources(DirContext resources); + +/** + * Return the Manager with which this Context is associated. If there is + * no associated Manager, return null. + */ +public Manager getManager(); + + +/** + * Set the Manager with which this Context is associated. + * + * @param manager The newly associated Manager + */ +public void setManager(Manager manager); } Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1357413&r1=1357412&r2=1357413&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Wed Jul 4 21:22:03 2012 @@ -16,7 +16,6 @@ */ package org.apache.catalina.core; - import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.io.File; @@ -53,7 +52,6 @@ import org.apache.catalina.Host; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleState; -import org.apache.catalina.Manager; import org.apache.catalina.Pipeline; import org.apache.catalina.Realm; import org.apache.catalina.Valve; @@ -196,12 +194,6 @@ public abstract class ContainerBase exte /** - * The Manager implementation with which this Container is associated. - */ -protected Manager manager = null; - - -/** * The cluster with which this Container is associated. */ protected Cluster cluster = null; @@ -374,65 +366,6 @@ public abstract class ContainerBase exte /** - * Return the Manager with which this Container is associated. If there is - * no associated Manager, return the Manager associated with our parent - * Container (if any); otherwise return null. - */ -@Override -public Manager getManager() { - -if (manager != null) -return (manager); -if (parent != null) -return (parent.getManager()); -return (null); - -} - - -/** - * Set the Manager with which this Container is associated. - * - * @param manager The newly associated Manager - */ -@Override -public synchronized void setManager(Manager manager) { - -// Change components if necessary -Manager oldManager = this.manager; -if (oldManager == manager) -return; -this.manager
svn commit: r1357414 - in /tomcat/trunk/java/org/apache/catalina: Manager.java ha/session/ClusterManagerBase.java ha/session/DeltaManager.java session/LocalStrings.properties session/ManagerBase.java
Author: markt Date: Wed Jul 4 21:23:00 2012 New Revision: 1357414 URL: http://svn.apache.org/viewvc?rev=1357414&view=rev Log: Refactor Manager to retain reference to Context rather than Container Modified: tomcat/trunk/java/org/apache/catalina/Manager.java tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java tomcat/trunk/java/org/apache/catalina/session/StandardManager.java Modified: tomcat/trunk/java/org/apache/catalina/Manager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Manager.java?rev=1357414&r1=1357413&r2=1357414&view=diff == --- tomcat/trunk/java/org/apache/catalina/Manager.java (original) +++ tomcat/trunk/java/org/apache/catalina/Manager.java Wed Jul 4 21:23:00 2012 @@ -51,7 +51,11 @@ public interface Manager { /** * Return the Container with which this Manager is associated. + * + * @deprecated Use {@link #getContext()}. This method will be removed in + * Tomcat 9 onwards. */ +@Deprecated public Container getContainer(); @@ -59,11 +63,29 @@ public interface Manager { * Set the Container with which this Manager is associated. * * @param container The newly associated Container + * + * @deprecated Use {@link #setContext()}. This method will be removed in + * Tomcat 9 onwards. */ +@Deprecated public void setContainer(Container container); /** + * Return the Context with which this Manager is associated. + */ +public Context getContext(); + + +/** + * Set the Container with which this Manager is associated. + * + * @param container The newly associated Context + */ +public void setContext(Context context); + + +/** * Return the distributable flag for the sessions supported by * this Manager. */ Modified: tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java?rev=1357414&r1=1357413&r2=1357414&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java Wed Jul 4 21:23:00 2012 @@ -144,7 +144,7 @@ public abstract class ClusterManagerBase public ClassLoader[] getClassLoaders() { -return getClassLoaders(container); +return getClassLoaders(getContext()); } /** Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java?rev=1357414&r1=1357413&r2=1357414&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java Wed Jul 4 21:23:00 2012 @@ -849,7 +849,9 @@ public class DeltaManager extends Cluste */ protected void registerSessionAtReplicationValve(DeltaSession session) { if(replicationValve == null) { -if(container instanceof StandardContext && ((StandardContext)container).getCrossContext()) { +Context context = getContext(); +if(context instanceof StandardContext && +((StandardContext)context).getCrossContext()) { CatalinaCluster cluster = getCluster() ; if(cluster != null) { Valve[] valves = cluster.getValves(); Modified: tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties?rev=1357414&r1=1357413&r2=1357414&view=diff == --- tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/session/LocalStrings.properties Wed Jul 4 21:23:00 2012 @@ -30,6 +30,7 @@ JDBCStore.checkConnectionClassNotFoundEx JDBCStore.wrongDataSource=Cannot open JNDI DataSource [{0}] JDBCStore.missingDataSourceName=No valid JNDI name was given. JDBCStore.commitSQLException=SQLException committing connection before closing +managerBase.container.noop=Managers added to containers other than Contexts will never be used managerBase.createSession.ise=createSession: Too many active sessions managerBase.sessionTimeout=Invalid session timeout setting {0} standardManag
svn commit: r1357415 - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/catalina/ha/session/ java/org/apache/catalina/ha/tcp/ java/org/apache/catalina/session/ test/org/apache/catalina
Author: markt Date: Wed Jul 4 21:24:28 2012 New Revision: 1357415 URL: http://svn.apache.org/viewvc?rev=1357415&view=rev Log: Switch from deprecated Manager.getContainer() to Manager.getContext() Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java tomcat/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java tomcat/trunk/java/org/apache/catalina/session/FileStore.java tomcat/trunk/java/org/apache/catalina/session/JDBCStore.java tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java tomcat/trunk/java/org/apache/catalina/session/StandardSession.java tomcat/trunk/java/org/apache/catalina/session/StoreBase.java tomcat/trunk/test/org/apache/catalina/session/Benchmarks.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1357415&r1=1357414&r2=1357415&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Wed Jul 4 21:24:28 2012 @@ -1937,7 +1937,7 @@ public class StandardContext extends Con // Start the new component if necessary if (manager != null) -manager.setContainer(this); +manager.setContext(this); if (getState().isAvailable() && (manager != null) && (manager instanceof Lifecycle)) { try { Modified: tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java?rev=1357415&r1=1357414&r2=1357415&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java Wed Jul 4 21:24:28 2012 @@ -152,7 +152,7 @@ public class BackupManager extends Clust try { if (getCluster() == null) { -Cluster cluster = getContainer().getCluster(); +Cluster cluster = getContext().getCluster(); if (cluster instanceof CatalinaCluster) { setCluster((CatalinaCluster)cluster); } else { Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java?rev=1357415&r1=1357414&r2=1357415&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java Wed Jul 4 21:24:28 2012 @@ -740,8 +740,8 @@ public class DeltaManager extends Cluste // stop remove cluster binding //wow, how many nested levels of if statements can we have ;) if(cluster == null) { -Container context = getContainer() ; -if(context != null && context instanceof Context) { +Context context = getContext() ; +if (context != null) { Container host = context.getParent() ; if(host != null && host instanceof Host) { cluster = host.getCluster(); @@ -1465,7 +1465,7 @@ public class DeltaManager extends Cluste session.setPrimarySession(false); session.setId(newSessionID, false); if (notifyContainerListenersOnReplication) { - getContainer().fireContainerEvent(Context.CHANGE_SESSION_ID_EVENT, + getContext().fireContainerEvent(Context.CHANGE_SESSION_ID_EVENT, new String[] {msg.getSessionID(), newSessionID}); } } Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java?rev=1357415&r1=1357414&r2=1357415&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java Wed Jul 4 21:24:28 2012 @@ -151,10 +151,10 @@ public class DeltaSession extends Standa else if ( manager instanceof ClusterManagerBase ) return ((ClusterManagerBase)manager).getClassLoaders(); else if ( manager in
[Tomcat Wiki] Update of "FAQ/Monitoring" by ChristopherSchultz
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "FAQ/Monitoring" page has been changed by ChristopherSchultz: http://wiki.apache.org/tomcat/FAQ/Monitoring?action=diff&rev1=1&rev2=2 + = Monitoring Tomcat = + Monitoring of a running Tomcat instance can be done in several ways, but observing a Tomcat instance via JMX beans will give you the best information available through standard interfaces (i.e. JMX). You can find information about [http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html|connecting to Tomcat via JMX] in the Tomcat Users' Guide. Rather than repeating that information here (which is mostly about configuration, connection, etc.), please go read the official documentation. This page is intended to be a community-curated collection of useful JMX beans that may be useful to you ''after'' you have made your JMX connection and want to observe interesting data through Tomcat's (and other) JMX beans. + 'NOTE: These JMX bean names are accurate for the current version of Tomcat 7 (7.0.28 at the time of this writing). If you are using a different version of Tomcat, you may have to adjust the names of the beans identified on this page. ' + - == JVM Memory Information == + == JVM Information == + + === Heap and other Memory Information === You will certainly want to inspect your JVM's memory usage. Here are some JMX beans and attributes that can be used to do so. @@ -18, +24 @@ Similar to the HeapMemoryUsage MXBean described above, this one will give you information about the "PermGen" heap generation. Depending upon your garbage collection and other memory settings, you might have different MXBeans under java.lang:type=MemoryPool with different names. You should inspect each one to determine if they would be useful for you to inspect. + == Tomcat Information == + + === Thread Usage === + + JMX Bean: Catalina:type=Executor,name=[executor name] + Attributes: poolSize, activeCount + + This is the number of threads currently in the executor's thread pool. Obviously, this is only useful if you are using an (which you ''are'' using, of course, right?). + + === Request Throughput === + + JMX Bean: Catalina:type=GlobalRequestProcessor,name="[depends]" + Attributes: bytesSent, bytesReceived, errorCount, maxTime, requestCount + Operations: resetCounters + + === Sessions === + + JMX Bean: Catalina:type=Manager,context=[context name],host=[hostname] + Attributes: activeSessions + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1357416 - /tomcat/trunk/webapps/docs/changelog.xml
Author: markt Date: Wed Jul 4 21:26:27 2012 New Revision: 1357416 URL: http://svn.apache.org/viewvc?rev=1357416&view=rev Log: Add recent refactoring to changelog Modified: tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1357416&r1=1357415&r2=1357416&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed Jul 4 21:26:27 2012 @@ -74,6 +74,12 @@ 52767: Remove reference to MySQL specific autoReconnect property in JDBCAccessLogValve. (markt) + +Move Manager, Loader and Resources from Container to Context since +Context is the only place they are used. The documentation already +states (and has done for some time) that Context is the only valid +location for these nested components. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Tomcat Wiki] Update of "FAQ/Monitoring" by ChristopherSchultz
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "FAQ/Monitoring" page has been changed by ChristopherSchultz: http://wiki.apache.org/tomcat/FAQ/Monitoring?action=diff&rev1=2&rev2=3 = Monitoring Tomcat = - Monitoring of a running Tomcat instance can be done in several ways, but observing a Tomcat instance via JMX beans will give you the best information available through standard interfaces (i.e. JMX). You can find information about [http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html|connecting to Tomcat via JMX] in the Tomcat Users' Guide. Rather than repeating that information here (which is mostly about configuration, connection, etc.), please go read the official documentation. + Monitoring of a running Tomcat instance can be done in several ways, but observing a Tomcat instance via JMX beans will give you the best information available through standard interfaces (i.e. JMX). You can find information about [[http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html|connecting to Tomcat via JMX]] in the Tomcat Users' Guide. Rather than repeating that information here (which is mostly about configuration, connection, etc.), please go read the official documentation. This page is intended to be a community-curated collection of useful JMX beans that may be useful to you ''after'' you have made your JMX connection and want to observe interesting data through Tomcat's (and other) JMX beans. - - 'NOTE: These JMX bean names are accurate for the current version of Tomcat 7 (7.0.28 at the time of this writing). If you are using a different version of Tomcat, you may have to adjust the names of the beans identified on this page. ' == JVM Information == @@ -14, +12 @@ You will certainly want to inspect your JVM's memory usage. Here are some JMX beans and attributes that can be used to do so. - JMX Bean: java.lang:type=Memory + * JMX Bean: `java.lang:type=Memory` - Attribute: HeapMemoryUsage + * Attribute: `HeapMemoryUsage` - The attribute value is a javax.management.openmbean.CompositeData which contains 4 keys: committed, init, max, and used. The 'used' key is probably the most useful (or a combination of 'used' / 'max' to get a memory-usage metric as a ratio). + The attribute value is a `javax.management.openmbean.CompositeData` which contains 4 keys: committed, init, max, and used. The 'used' key is probably the most useful (or a combination of 'used' / 'max' to get a memory-usage metric as a ratio). - JMX Bean: java.lang:type=MemoryPool,name=CMS Perm Gen + * JMX Bean: `java.lang:type=MemoryPool,name=CMS Perm Gen` - Attribute: Usage + * Attribute: `Usage` - Similar to the HeapMemoryUsage MXBean described above, this one will give you information about the "PermGen" heap generation. Depending upon your garbage collection and other memory settings, you might have different MXBeans under java.lang:type=MemoryPool with different names. You should inspect each one to determine if they would be useful for you to inspect. + Similar to the `HeapMemoryUsage` MXBean described above, this one will give you information about the "`PermGen`" heap generation. Depending upon your garbage collection and other memory settings, you might have different MXBeans under `java.lang:type=MemoryPool` with different names. You should inspect each one to determine if they would be useful for you to inspect. == Tomcat Information == + {{{#!wiki caution + Version Warning + + These JMX bean names are accurate for the current version of Tomcat 7 (7.0.28 at the time of this writing). If you are using a different version of Tomcat, you may have to adjust the names of the beans identified on this page. + }}} + === Thread Usage === - JMX Bean: Catalina:type=Executor,name=[executor name] + * JMX Bean: `Catalina:type=Executor,name=[executor name]` - Attributes: poolSize, activeCount + * Attributes: `poolSize`, `activeCount` This is the number of threads currently in the executor's thread pool. Obviously, this is only useful if you are using an (which you ''are'' using, of course, right?). === Request Throughput === - JMX Bean: Catalina:type=GlobalRequestProcessor,name="[depends]" + * JMX Bean: `Catalina:type=GlobalRequestProcessor,name="[depends]"` - Attributes: bytesSent, bytesReceived, errorCount, maxTime, requestCount + * Attributes: `bytesSent`, `bytesReceived`, `errorCount`, `maxTime`, `requestCount` - Operations: resetCounters + * Operations: `resetCounters` === Sessions === - JMX Bean: Catalina:type=Manager,context=[context name],host=[hostname] + * JMX Bean: `Catalina:type=Manager,context=[context name],host=[hostname]` - Attributes: activeSessions + * Attributes: `activeSessions` - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mai