tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1416793 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
Date Tue, 04 Dec 2012 06:31:27 GMT
Author: kfujino
Date: Tue Dec  4 06:31:27 2012
New Revision: 1416793

URL: http://svn.apache.org/viewvc?rev=1416793&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/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java

Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java?rev=1416793&r1=1416792&r2=1416793&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
(original)
+++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
Tue Dec  4 06:31:27 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);
         }



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


Mime
View raw message