aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1627466 - in /aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc: RecoverableDataSource.java internal/ConnectionManagerFactory.java internal/ManagedDataSourceFactory.java
Date Thu, 25 Sep 2014 07:00:09 GMT
Author: gnodet
Date: Thu Sep 25 07:00:09 2014
New Revision: 1627466

URL: http://svn.apache.org/r1627466
Log:
[ARIES-1246] ConnectionManagerFactory does not honor aries.xa.name service property

Modified:
    aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/RecoverableDataSource.java
    aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ConnectionManagerFactory.java
    aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ManagedDataSourceFactory.java

Modified: aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/RecoverableDataSource.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/RecoverableDataSource.java?rev=1627466&r1=1627465&r2=1627466&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/RecoverableDataSource.java
(original)
+++ aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/RecoverableDataSource.java
Thu Sep 25 07:00:09 2014
@@ -225,6 +225,7 @@ public class RecoverableDataSource imple
         cm.setBackgroundValidation(backgroundValidation);
         cm.setBackgroundValidationMilliseconds(backgroundValidationMilliseconds);
         cm.setTransaction(transaction);
+        cm.setName(name);
         cm.init();
 
         delegate = (DataSource) mcf.getConnectionFactory().createConnectionFactory(cm.getConnectionManager());

Modified: aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ConnectionManagerFactory.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ConnectionManagerFactory.java?rev=1627466&r1=1627465&r2=1627466&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ConnectionManagerFactory.java
(original)
+++ aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ConnectionManagerFactory.java
Thu Sep 25 07:00:09 2014
@@ -42,6 +42,8 @@ public class ConnectionManagerFactory {
     private AriesTransactionManager transactionManager;
     private ManagedConnectionFactory managedConnectionFactory;
 
+    private String name;
+
     private TransactionSupport transactionSupport;
     private String transaction;
 
@@ -154,7 +156,7 @@ public class ConnectionManagerFactory {
                         connectionTracker,
                         transactionManager,
                         managedConnectionFactory,
-                        getClass().getName(),
+                        name != null ? name : getClass().getName(),
                         getClass().getClassLoader(),
                         backgroundValidationMilliseconds);
             } else {
@@ -166,7 +168,7 @@ public class ConnectionManagerFactory {
                         connectionTracker,
                         transactionManager,
                         managedConnectionFactory,
-                        getClass().getName(),
+                        name != null ? name : getClass().getName(),
                         getClass().getClassLoader());
             }
 
@@ -212,6 +214,14 @@ public class ConnectionManagerFactory {
         return transaction;
     }
 
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
     public void setTransaction(String transaction) {
         this.transaction = transaction;
     }

Modified: aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ManagedDataSourceFactory.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ManagedDataSourceFactory.java?rev=1627466&r1=1627465&r2=1627466&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ManagedDataSourceFactory.java
(original)
+++ aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ManagedDataSourceFactory.java
Thu Sep 25 07:00:09 2014
@@ -116,6 +116,7 @@ public class ManagedDataSourceFactory {
         cm.setBackgroundValidation(getBool("aries.xa.backgroundValidation", false));
         cm.setBackgroundValidationMilliseconds(getInt("aries.xa.backgroundValidationMilliseconds",
600000));
         cm.setTransaction(getString("aries.xa.transaction", "xa"));
+        cm.setName(getResourceName());
         cm.init();
 
         BundleContext context = reference.getBundle().getBundleContext();



Mime
View raw message