Author: markt
Date: Mon Jun 26 20:39:16 2017
New Revision: 1799986
URL: http://svn.apache.org/viewvc?rev=1799986&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=61224
Make the GlobalRequestProcessor MBean attributes read-only.
Patch provided by Alexis Hassler.
This closes #68
Added:
tomcat/trunk/java/org/apache/coyote/mbeans-descriptors.xml (with props)
Modified:
tomcat/trunk/java/org/apache/coyote/RequestGroupInfo.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/coyote/RequestGroupInfo.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/RequestGroupInfo.java?rev=1799986&r1=1799985&r2=1799986&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/RequestGroupInfo.java (original)
+++ tomcat/trunk/java/org/apache/coyote/RequestGroupInfo.java Mon Jun 26
20:39:16 2017
@@ -19,11 +19,13 @@ package org.apache.coyote;
import java.util.ArrayList;
import java.util.List;
+import org.apache.tomcat.util.modeler.BaseModelMBean;
+
/** This can be moved to top level ( eventually with a better name ).
* It is currently used only as a JMX artifact, to aggregate the data
* collected from each RequestProcessor thread.
*/
-public class RequestGroupInfo {
+public class RequestGroupInfo extends BaseModelMBean {
private final List<RequestInfo> processors = new ArrayList<>();
private long deadMaxTime = 0;
private long deadProcessingTime = 0;
Added: tomcat/trunk/java/org/apache/coyote/mbeans-descriptors.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/mbeans-descriptors.xml?rev=1799986&view=auto
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/mbeans-descriptors.xml (added)
+++ tomcat/trunk/java/org/apache/coyote/mbeans-descriptors.xml Mon Jun 26
20:39:16 2017
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<mbeans-descriptors>
+
+ <mbean name="RequestGroupInfo"
+ description="Runtime information of a group of requests"
+ domain="Catalina"
+ group="Connector"
+ type="org.apache.coyote.RequestGroupInfo">
+
+ <attribute name="maxTime"
+ description="Maximum time to process a request"
+ type="long"
+ writeable="false"/>
+
+ <attribute name="processingTime"
+ description="Total time to process the requests"
+ type="long"
+ writeable="false"/>
+
+ <attribute name="requestCount"
+ description="Number of requests processed"
+ type="int"
+ writeable="false"/>
+
+ <attribute name="errorCount"
+ description="Number of errors"
+ type="int"
+ writeable="false"/>
+
+ <attribute name="bytesReceived"
+ description="Amount of data received, in bytes"
+ type="long"
+ writeable="false"/>
+
+ <attribute name="bytesSent"
+ description="Amount of data sent, in bytes"
+ type="long"
+ writeable="false"/>
+
+ <operation name="resetCounters" description="Reset counters"
impact="ACTION" returnType="void"/>
+
+ </mbean>
+</mbeans-descriptors>
\ No newline at end of file
Propchange: tomcat/trunk/java/org/apache/coyote/mbeans-descriptors.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1799986&r1=1799985&r2=1799986&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jun 26 20:39:16 2017
@@ -90,6 +90,10 @@
<fix>
<bug>60461</bug>: Sync SSL session access for the APR connector. (remm)
</fix>
+ <fix>
+ <bug>61224</bug>: Make the <code>GlobalRequestProcessor</code> MBean
+ attributes read-only. Patch provided by Alexis Hassler. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Tribes">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]