aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1627897 - /aries/trunk/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ManagedDataSourceFactory.java
Date Fri, 26 Sep 2014 22:02:18 GMT
Author: gnodet
Date: Fri Sep 26 22:02:17 2014
New Revision: 1627897

URL: http://svn.apache.org/r1627897
Log:
[ARIES-1250] The aries.xa.aware flag should only be set on XA aware DataSources

Modified:
    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/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=1627897&r1=1627896&r2=1627897&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
Fri Sep 26 22:02:17 2014
@@ -95,13 +95,15 @@ public class ManagedDataSourceFactory {
     }
 
     public void register() throws Exception {
+        boolean isXaDataSource = (dataSource instanceof XADataSource);
+
         Hashtable<String, Object> props = new Hashtable<String, Object>(this.properties);
         props.put("aries.managed", "true");
-        props.put("aries.xa.aware", "true");
+        if (isXaDataSource) {
+            props.put("aries.xa.aware", "true");
+        }
         props.put(Constants.SERVICE_RANKING, getInt(Constants.SERVICE_RANKING, 0) + 1000);
 
-        boolean isXaDataSource = (dataSource instanceof XADataSource);
-
         AbstractMCFFactory mcf = isXaDataSource ? new XADataSourceMCFFactory() : new DataSourceMCFFactory();
         mcf.setDataSource(dataSource);
         mcf.setExceptionSorterAsString(getString("aries.xa.exceptionSorter", "all"));



Mime
View raw message