tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1416794 - in /tomcat/tc7.0.x/trunk: modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java webapps/docs/changelog.xml
Date Tue, 04 Dec 2012 06:35:13 GMT
Author: kfujino
Date: Tue Dec  4 06:35:12 2012
New Revision: 1416794

URL: http://svn.apache.org/viewvc?rev=1416794&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54194
Make sure that connection pool mbean is not registered when jmxEnabled is false. 

Modified:
    tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java?rev=1416794&r1=1416793&r2=1416794&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
(original)
+++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
Tue Dec  4 06:35:12 2012
@@ -98,8 +98,10 @@ public class DataSource extends DataSour
     @Override
     public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception {
         try {
-            this.oname = createObjectName(name);
-            if (oname!=null) registerJmx();
+            if ( isJmxEnabled() ) { 
+                this.oname = createObjectName(name);
+                if (oname!=null) registerJmx();
+            }
         }catch (MalformedObjectNameException x) {
             log.error("Unable to create object name for JDBC pool.",x);
         }

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=1416794&r1=1416793&r2=1416794&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Dec  4 06:35:12 2012
@@ -111,6 +111,10 @@
         <bug>54150</bug>: Make sure that SlowQueryReportJmx mbean deregistered
         during webapp shutdown. Reported by Alex Franken. (kfujino)
       </fix>
+      <fix>
+        <bug>54194</bug>: Make sure that connection pool mbean is not registered
+        when jmxEnabled is false. Patch provided by tobias.gierke. (kfujino)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">



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


Mime
View raw message