tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r1354641 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSource.java
Date Wed, 27 Jun 2012 17:36:06 GMT
Author: fhanik
Date: Wed Jun 27 17:36:05 2012
New Revision: 1354641

URL: http://svn.apache.org/viewvc?rev=1354641&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53416
Make sure we retain the domain if the registration comes from Tomcat

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=1354641&r1=1354640&r2=1354641&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
Wed Jun 27 17:36:05 2012
@@ -118,7 +118,9 @@ public class DataSource extends DataSour
         String origDomain = original.getDomain();
         properties.put("type", "ConnectionPool");
         properties.put("class", this.getClass().getName());
-        if (original.getKeyProperty("path")!=null) {
+        if (original.getKeyProperty("path")!=null || properties.get("context")!=null) {
+            //this ensures that if the registration came from tomcat, we're not losing
+            //the unique domain, but putting that into as an engine attribute
             properties.put("engine", origDomain);
         }
         ObjectName name = new ObjectName(domain,properties);



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


Mime
View raw message