You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/02/23 22:14:22 UTC

svn commit: r1731958 - in /tomcat/trunk: java/org/apache/catalina/core/StandardServer.java java/org/apache/catalina/core/mbeans-descriptors.xml webapps/docs/changelog.xml

Author: markt
Date: Tue Feb 23 21:14:22 2016
New Revision: 1731958

URL: http://svn.apache.org/viewvc?rev=1731958&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58351
Make the server build date and server version number accessible via JMX.
Patch provided by  Huxing Zhang.

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
    tomcat/trunk/java/org/apache/catalina/core/mbeans-descriptors.xml
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardServer.java?rev=1731958&r1=1731957&r2=1731958&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardServer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardServer.java Tue Feb 23 21:14:22 2016
@@ -242,10 +242,28 @@ public final class StandardServer extend
      * @return Tomcat release identifier
      */
     public String getServerInfo() {
-
         return ServerInfo.getServerInfo();
     }
 
+
+    /**
+     * Return the current server built timestamp
+     * @return server built timestamp.
+     */
+    public String getServerBuilt() {
+        return ServerInfo.getServerBuilt();
+    }
+
+
+    /**
+     * Return the current server's version number.
+     * @return server's version number.
+     */
+    public String getServerNumber() {
+        return ServerInfo.getServerNumber();
+    }
+
+
     /**
      * Return the port number we listen to for shutdown commands.
      */

Modified: tomcat/trunk/java/org/apache/catalina/core/mbeans-descriptors.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/mbeans-descriptors.xml?rev=1731958&r1=1731957&r2=1731958&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/mbeans-descriptors.xml (original)
+++ tomcat/trunk/java/org/apache/catalina/core/mbeans-descriptors.xml Tue Feb 23 21:14:22 2016
@@ -1323,6 +1323,16 @@
                type="java.lang.String"
                writeable="false"/>
 
+    <attribute name="serverBuilt"
+               description="Tomcat server built timestamp"
+               type="java.lang.String"
+               writeable="false"/>
+
+    <attribute name="serverNumber"
+               description="Tomcat server's version number"
+               type="java.lang.String"
+               writeable="false"/>
+
     <attribute name="serviceNames"
                description="Object names of all services we know about"
                type="[Ljavax.management.ObjectName;"

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1731958&r1=1731957&r2=1731958&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Feb 23 21:14:22 2016
@@ -65,6 +65,10 @@
         directory as the <code>docBase</code>. (markt)
       </fix>
       <add>
+        <bug>58351</bug>: Make the server build date and server version number
+        accessible via JMX. Patch provided by  Huxing Zhang. (markt)
+      </add>
+      <add>
         <bug>58988</bug>: Special characters in the substitutions for the RewriteValve
         can now be quoted with a backslash. (fschumacher)
       </add>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org