aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tjwat...@apache.org
Subject svn commit: r1606837 [24/27] - in /aries/branches/subsystemsR6: ./ application/ application/application-api/ application/application-bundle/ application/application-converters/ application/application-default-local-platform/ application/application-dep...
Date Mon, 30 Jun 2014 16:55:06 GMT
Modified: aries/branches/subsystemsR6/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BaseNameSpaceHandlerSetup.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BaseNameSpaceHandlerSetup.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BaseNameSpaceHandlerSetup.java (original)
+++ aries/branches/subsystemsR6/transaction/transaction-blueprint/src/test/java/org/apache/aries/transaction/BaseNameSpaceHandlerSetup.java Mon Jun 30 16:54:57 2014
@@ -21,6 +21,7 @@ package org.apache.aries.transaction;
 import java.net.URI;
 import java.net.URL;
 import java.util.Arrays;
+import java.util.Dictionary;
 import java.util.Properties;
 import java.util.Set;
 
@@ -76,7 +77,7 @@ public class BaseNameSpaceHandlerSetup {
             
         Properties props = new Properties();
         props.put("osgi.service.blueprint.namespace", new String[]{"http://aries.apache.org/xmlns/transactions/v1.0.0", "http://aries.apache.org/xmlns/transactions/v1.1.0", "http://aries.apache.org/xmlns/transactions/v1.2.0"});
-        ctx.registerService(NamespaceHandler.class.getName(), namespaceHandler, props);
+        ctx.registerService(NamespaceHandler.class.getName(), namespaceHandler, (Dictionary) props);
     }
       
     @After

Modified: aries/branches/subsystemsR6/transaction/transaction-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/transaction/transaction-itests/pom.xml?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/transaction/transaction-itests/pom.xml (original)
+++ aries/branches/subsystemsR6/transaction/transaction-itests/pom.xml Mon Jun 30 16:54:57 2014
@@ -18,189 +18,224 @@
  under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+
+    <modelVersion>4.0.0</modelVersion>
+
     <parent>
         <groupId>org.apache.aries</groupId>
-        <artifactId>java5-parent</artifactId>
-        <version>1.0.0</version>
-        <relativePath />
+        <artifactId>parent</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
-  <groupId>org.apache.aries.transaction</groupId>
-  <artifactId>org.apache.aries.transaction.itests</artifactId>
-  <name>Apache Aries Transaction Integration Tests</name>
-  <version>1.0.1-SNAPSHOT</version>
-
-     <scm>
-         <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-itests</connection>
-         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-itests</developerConnection>
-         <url>http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-itests</url>
-     </scm>
 
-  <dependencies>
+    <groupId>org.apache.aries.transaction</groupId>
+    <artifactId>org.apache.aries.transaction.itests</artifactId>
+    <name>Apache Aries Transaction Integration Tests</name>
+    <version>1.0.1-SNAPSHOT</version>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-itests</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-itests</developerConnection>
+        <url>http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-itests</url>
+    </scm>
+
+    <properties>
+        <exam.version>3.4.0</exam.version>
+        <url.version>1.6.0</url.version>
+    </properties>
+
+    <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
+            <artifactId>org.osgi.compendium</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-            <scope>provided</scope>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.core</artifactId>
+            <scope>test</scope>
+            <version>1.4.0</version>
         </dependency>
         <dependency>
-            <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam</artifactId>
+            <groupId>org.apache.aries.proxy</groupId>
+            <artifactId>org.apache.aries.proxy.impl</artifactId>
             <scope>test</scope>
+            <version>1.0.3-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-junit</artifactId>
+            <groupId>org.apache.aries.transaction</groupId>
+            <artifactId>org.apache.aries.transaction.manager</artifactId>
             <scope>test</scope>
+            <version>1.1.1-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-container-default</artifactId>
+            <groupId>org.apache.aries.transaction</groupId>
+            <artifactId>org.apache.aries.transaction.blueprint</artifactId>
             <scope>test</scope>
+            <version>1.0.2-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>org.ops4j.pax.logging</groupId>
-            <artifactId>pax-logging-api</artifactId>
+            <groupId>org.apache.aries.transaction</groupId>
+            <artifactId>org.apache.aries.transaction.jdbc</artifactId>
             <scope>test</scope>
+            <version>2.1.0-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>org.ops4j.pax.logging</groupId>
-            <artifactId>pax-logging-service</artifactId>
+            <groupId>org.apache.aries.transaction</groupId>
+            <artifactId>org.apache.aries.transaction.testds</artifactId>
             <scope>test</scope>
+            <version>1.0.1-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>org.ops4j.pax.url</groupId>
-            <artifactId>pax-url-mvn</artifactId>
+            <groupId>org.apache.aries.transaction</groupId>
+            <artifactId>org.apache.aries.transaction.testbundle</artifactId>
             <scope>test</scope>
+            <version>1.0.1-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>org.ops4j.pax.swissbox</groupId>
-            <artifactId>pax-swissbox-tinybundles</artifactId>
+            <groupId>org.apache.aries.testsupport</groupId>
+            <artifactId>org.apache.aries.testsupport.unit</artifactId>
+            <version>2.0.0-SNAPSHOT</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.eclipse</groupId>
+            <artifactId>org.eclipse.osgi</artifactId>
+            <version>3.8.0.v20120529-1548</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ow2.asm</groupId>
+            <artifactId>asm-all</artifactId>
             <scope>test</scope>
+            <version>5.0.3</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.aries.blueprint</groupId>
-            <artifactId>org.apache.aries.blueprint</artifactId>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-api</artifactId>
             <scope>test</scope>
-            <version>1.0.0</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.aries.proxy</groupId>
-            <artifactId>org.apache.aries.proxy</artifactId>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-service</artifactId>
             <scope>test</scope>
-            <version>1.0.0</version>
         </dependency>
+
+        <!-- pax exam -->
         <dependency>
-            <groupId>org.apache.aries.transaction</groupId>
-            <artifactId>org.apache.aries.transaction.manager</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.7.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam</artifactId>
+            <version>${exam.version}</version>
             <scope>test</scope>
-            <version>1.1.0-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.aries.transaction</groupId>
-            <artifactId>org.apache.aries.transaction.blueprint</artifactId>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-native</artifactId>
+            <version>${exam.version}</version>
             <scope>test</scope>
-            <version>1.0.1</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.aries.transaction</groupId>
-            <artifactId>org.apache.aries.transaction.jdbc</artifactId>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit4</artifactId>
+            <version>${exam.version}</version>
             <scope>test</scope>
-            <version>2.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.aries.transaction</groupId>
-            <artifactId>org.apache.aries.transaction.testds</artifactId>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-link-mvn</artifactId>
+            <version>${exam.version}</version>
             <scope>test</scope>
-            <version>1.0.0</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.aries.transaction</groupId>
-            <artifactId>org.apache.aries.transaction.testbundle</artifactId>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-aether</artifactId>
+            <version>${url.version}</version>
             <scope>test</scope>
-            <version>1.0.0</version>
         </dependency>
         <dependency>
-          <groupId>org.apache.aries.testsupport</groupId>
-          <artifactId>org.apache.aries.testsupport.unit</artifactId>
-          <version>1.0.0</version>
-          <scope>test</scope>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+            <version>0.9.29</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.eclipse</groupId>
-            <artifactId>osgi</artifactId>
-            <scope>provided</scope>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>0.9.29</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.tinybundles</groupId>
+            <artifactId>tinybundles</artifactId>
+            <version>2.0.0</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>org.osgi.core</artifactId>
+                    <groupId>org.osgi</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
         </dependency>
-      <dependency>
-           <groupId>org.ow2.asm</groupId>
-            <artifactId>asm-all</artifactId>
-          <scope>test</scope>
-          <version>4.0</version>
-      </dependency>
     </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.servicemix.tooling</groupId>
-        <artifactId>depends-maven-plugin</artifactId>
-        <version>1.2</version>
-        <executions>
-          <execution>
-            <id>generate-depends-file</id>
-            <goals>
-              <goal>generate-depends-file</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-surefire-plugin</artifactId>
-          <configuration>
-              <forkMode>pertest</forkMode>
-              <excludes>
-                  <exclude>**/*$*</exclude>
-                  <exclude>**/Abstract*.java</exclude>
-              </excludes>
-              <includes>
-                  <include>**/Test*.java</include>
-                  <include>**/*Test.java</include>
-              </includes>
-          </configuration>
-      </plugin>
-    </plugins>
-  </build>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>depends-maven-plugin</artifactId>
+                <version>1.2</version>
+                <executions>
+                    <execution>
+                        <id>generate-depends-file</id>
+                        <goals>
+                            <goal>generate-depends-file</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <forkMode>pertest</forkMode>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
     <profiles>
-      <profile>
-          <id>ci-build-profile</id>
-          <activation>
-              <property>
-                  <name>maven.repo.local</name>
-              </property>
-          </activation>
-          <build>
-              <plugins>
-                  <plugin>
-                      <groupId>org.apache.maven.plugins</groupId>
-                      <artifactId>maven-surefire-plugin</artifactId>
-                      <configuration>
-                          <!--
-                              when the local repo location has been specified, we need to pass
-                              on this information to PAX mvn url
-                          -->
-                          <argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${maven.repo.local}</argLine>
-                      </configuration>
-                  </plugin>
-              </plugins>
-          </build>
-      </profile>
-   </profiles>
+        <profile>
+            <id>ci-build-profile</id>
+            <activation>
+                <property>
+                    <name>maven.repo.local</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <forkMode>pertest</forkMode>
+                            <!--
+                                when the local repo location has been specified, we need to pass
+                                on this information to PAX mvn url
+                            -->
+                            <argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${maven.repo.local}</argLine>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>

Modified: aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/AbstractIntegrationTest.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/AbstractIntegrationTest.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/AbstractIntegrationTest.java (original)
+++ aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/AbstractIntegrationTest.java Mon Jun 30 16:54:57 2014
@@ -18,55 +18,66 @@
  */
 package org.apache.aries.transaction.itests;
 
-import static org.ops4j.pax.exam.CoreOptions.bootDelegationPackages;
-import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.ops4j.pax.exam.CoreOptions.composite;
+import static org.ops4j.pax.exam.CoreOptions.frameworkProperty;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
+import static org.ops4j.pax.exam.CoreOptions.vmOption;
+import static org.ops4j.pax.exam.CoreOptions.when;
 
-import static org.apache.aries.itest.ExtraOptions.*;
-
-import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerSuite;
 
-@RunWith(JUnit4TestRunner.class)
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerSuite.class)
 public abstract class AbstractIntegrationTest extends org.apache.aries.itest.AbstractIntegrationTest {
-
-    @org.ops4j.pax.exam.junit.Configuration
-    public static Option[] configuration() {
-        return testOptions(
-                bootDelegationPackages("javax.transaction", "javax.transaction.*"),
-                vmOption("-Dorg.osgi.framework.system.packages=javax.accessibility,javax.activation,javax.activity,javax.annotation,javax.annotation.processing,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.jws,javax.jws.soap,javax.lang.model,javax.lang.model.element,javax.lang.model.type,javax.lang.model.util,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.script,javax.security.auth,javax.security.auth.callback,
 javax.security.auth.kerberos,javax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.tools,javax.xml,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.bind.helpers,javax.xml.bind.util,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,ja
 vax.xml.parsers,javax.xml.soap,javax.xml.stream,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stax,javax.xml.transform.stream,javax.xml.validation,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.TypeCodePackage,org.omg.CORBA.portable,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.P
 OAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.ServantLocatorPackage,org.omg.PortableServer.portable,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,org.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.stylesheets,org.w3c.dom.traversal,org.w3c.dom.views,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers,javax.transaction;partial=true;mandatory:=partial,javax.transaction.xa;partial=true;mandatory:=partial"),
-
-                // Log
-                mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
-                mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
-
+	
+	public Option baseOptions() {
+        String localRepo = System.getProperty("maven.repo.local");
+        if (localRepo == null) {
+            localRepo = System.getProperty("org.ops4j.pax.url.mvn.localRepository");
+        }
+        return composite(
+                junitBundles(),
                 // this is how you set the default log level when using pax
                 // logging (logProfile)
-                systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
+                systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
+                when(localRepo != null).useOptions(vmOption("-Dorg.ops4j.pax.url.mvn.localRepository=" + localRepo))
+         );
+    }
+
+    @Configuration
+    public Option[] configuration() {
+        return new Option[] {
+        		baseOptions(),
+                frameworkProperty("org.osgi.framework.system.packages")
+                	.value("javax.accessibility,javax.activation,javax.activity,javax.annotation,javax.annotation.processing,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.jws,javax.jws.soap,javax.lang.model,javax.lang.model.element,javax.lang.model.type,javax.lang.model.util,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.script,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,javax.sec
 urity.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.tools,javax.xml,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.bind.helpers,javax.xml.bind.util,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.soap,javax.x
 ml.stream,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stax,javax.xml.transform.stream,javax.xml.validation,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.TypeCodePackage,org.omg.CORBA.portable,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServe
 r.POAPackage,org.omg.PortableServer.ServantLocatorPackage,org.omg.PortableServer.portable,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,org.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.stylesheets,org.w3c.dom.traversal,org.w3c.dom.views,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers"),
+        		mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit").versionAsInProject(),
                 systemProperty("org.apache.aries.proxy.weaving.enabled").value("none"),
 
                 // Bundles
-                mavenBundle("org.osgi", "org.osgi.compendium"),
-                //mavenBundle("org.ow2.asm", "asm-all"),
+                mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
+                mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
+                mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
                 mavenBundle("org.apache.derby", "derby"),
                 mavenBundle("org.apache.aries", "org.apache.aries.util"),
-                mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"), 
-                mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
-                mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.manager"),
-                mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.blueprint"),
-                mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.jdbc"),
-                mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.testbundle"),
-                mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.testds"),
+                mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.api"),
+                mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.core"),
+                mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy.api"),
+                mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy.impl"),
+                mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.manager").versionAsInProject(),
+                mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.blueprint").versionAsInProject(),
+                mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.jdbc").versionAsInProject(),
+                mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.testbundle").versionAsInProject(),
+                mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.testds").versionAsInProject(),
 
                 //new VMOption( "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" ),
                 //new TimeoutOption( 0 ),
-                PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),
-
-                equinox().version("3.5.0"),
-                equinox().version("3.7.0.v20110613"));
+        };
     }
 }
\ No newline at end of file

Modified: aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/MandatoryTranAttributeTest.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/MandatoryTranAttributeTest.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/MandatoryTranAttributeTest.java (original)
+++ aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/MandatoryTranAttributeTest.java Mon Jun 30 16:54:57 2014
@@ -30,6 +30,7 @@ public class MandatoryTranAttributeTest 
   
   @Test
   public void testMandatory() throws Exception {
+	  String prefix = "MTAT";
       TestBean bean = context().getService(TestBean.class, "(tranAttribute=Mandatory)");
       UserTransaction tran = context().getService(UserTransaction.class);
       
@@ -37,7 +38,7 @@ public class MandatoryTranAttributeTest 
       int initialRows = bean.countRows();
       
       tran.begin();
-      bean.insertRow("testWithClientTran", 1);
+      bean.insertRow(prefix + "testWithClientTran", 1);
       tran.commit();
       
       int finalRows = bean.countRows();
@@ -47,10 +48,10 @@ public class MandatoryTranAttributeTest 
       initialRows = bean.countRows();
       
       tran.begin();
-      bean.insertRow("testWithClientTranAndWithAppException", 1);
+      bean.insertRow(prefix + "testWithClientTranAndWithAppException", 1);
       
       try {
-          bean.insertRow("testWithClientTranAndWithAppException", 2, new SQLException("Dummy exception"));
+          bean.insertRow(prefix + "testWithClientTranAndWithAppException", 2, new SQLException("Dummy exception"));
       } catch (SQLException e) {
           e.printStackTrace();
       }
@@ -64,10 +65,10 @@ public class MandatoryTranAttributeTest 
       initialRows = bean.countRows();
       
       tran.begin();
-      bean.insertRow("testWithClientTranAndWithRuntimeException", 1);
+      bean.insertRow(prefix + "testWithClientTranAndWithRuntimeException", 1);
       
       try {
-          bean.insertRow("testWithClientTranAndWithRuntimeException", 2, new RuntimeException("Dummy exception"));
+          bean.insertRow(prefix + "testWithClientTranAndWithRuntimeException", 2, new RuntimeException("Dummy exception"));
       } catch (RuntimeException e) {
           e.printStackTrace();
       }
@@ -84,7 +85,7 @@ public class MandatoryTranAttributeTest 
       
       //Test without client transaction - an exception is thrown because a transaction is mandatory
       try {
-          bean.insertRow("testWithoutClientTran", 1);
+          bean.insertRow(prefix + "testWithoutClientTran", 1);
           fail("IllegalStateException not thrown");
       } catch (IllegalStateException e) {
           e.printStackTrace();

Modified: aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/NeverTranAttributeTest.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/NeverTranAttributeTest.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/NeverTranAttributeTest.java (original)
+++ aries/branches/subsystemsR6/transaction/transaction-itests/src/test/java/org/apache/aries/transaction/itests/NeverTranAttributeTest.java Mon Jun 30 16:54:57 2014
@@ -61,4 +61,5 @@ public class NeverTranAttributeTest exte
       finalRows = bean.countRows();
       assertTrue("Initial rows: " + initialRows + ", Final rows: " + finalRows, finalRows - initialRows == 0);
   }
+  
 }

Modified: aries/branches/subsystemsR6/transaction/transaction-jdbc/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/transaction/transaction-jdbc/pom.xml?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/transaction/transaction-jdbc/pom.xml (original)
+++ aries/branches/subsystemsR6/transaction/transaction-jdbc/pom.xml Mon Jun 30 16:54:57 2014
@@ -18,51 +18,55 @@
  under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+
+    <modelVersion>4.0.0</modelVersion>
+
     <parent>
         <groupId>org.apache.aries</groupId>
-        <artifactId>java5-parent</artifactId>
-        <version>1.0.0</version>
-        <relativePath />
+        <artifactId>parent</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
-  <groupId>org.apache.aries.transaction</groupId>
-  <artifactId>org.apache.aries.transaction.jdbc</artifactId>
-  <name>Apache Aries Transaction Enlisting JDBC Datasource</name>
-  <version>2.0.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-
-     <scm>
-         <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-jdbc</connection>
-         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-jdbc</developerConnection>
-         <url>http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-jdbc</url>
-     </scm>
-
-  <properties>
-    <aries.osgi.export.pkg>
-      org.apache.aries.transaction.jdbc;-noimport:=true;version="2.0",
-      javax.resource*;version="1.6.0",
-    </aries.osgi.export.pkg>
-    <aries.osgi.import>
-      org.osgi.service.blueprint;resolution:=optional,
-      javax.validation;resolution:=optional,
-      *
-    </aries.osgi.import>
-    <aries.osgi.private.pkg>
-      org.apache.aries.transaction.jdbc.internal,
-      org.apache.geronimo.connector*,
-      org.tranql*,
-    </aries.osgi.private.pkg>
-    <aries.osgi.activator>
-      org.apache.aries.transaction.jdbc.internal.Activator
-    </aries.osgi.activator>
-  </properties>
-
-  <dependencies>
-      <dependency>
-          <groupId>org.apache.aries.transaction</groupId>
-          <artifactId>org.apache.aries.transaction.manager</artifactId>
-          <version>1.1.0-SNAPSHOT</version>
-      </dependency>
+
+    <groupId>org.apache.aries.transaction</groupId>
+    <artifactId>org.apache.aries.transaction.jdbc</artifactId>
+    <name>Apache Aries Transaction Enlisting JDBC Datasource</name>
+    <version>2.1.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-jdbc</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-jdbc</developerConnection>
+        <url>http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-jdbc</url>
+    </scm>
+
+    <properties>
+        <aries.osgi.export.pkg>
+            org.apache.aries.transaction.jdbc;-noimport:=true;version="2.0",
+            javax.resource*;version="1.6.0",
+        </aries.osgi.export.pkg>
+        <aries.osgi.import>
+            org.osgi.service.blueprint;resolution:=optional,
+            javax.validation;resolution:=optional,
+            *
+        </aries.osgi.import>
+        <aries.osgi.private.pkg>
+            org.apache.aries.transaction.jdbc.internal,
+            org.apache.geronimo.connector*,
+            org.tranql*,
+        </aries.osgi.private.pkg>
+        <aries.osgi.activator>
+            org.apache.aries.transaction.jdbc.internal.Activator
+        </aries.osgi.activator>
+        <lastReleaseVersion>1.0.0</lastReleaseVersion>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.aries.transaction</groupId>
+            <artifactId>org.apache.aries.transaction.manager</artifactId>
+            <version>1.1.1-SNAPSHOT</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.aries</groupId>
             <artifactId>org.apache.aries.util</artifactId>
@@ -83,31 +87,31 @@
             <artifactId>slf4j-api</artifactId>
             <scope>provided</scope>
         </dependency>
-      <dependency>
-          <groupId>org.tranql</groupId>
-          <artifactId>tranql-connector</artifactId>
-          <version>1.8</version>
-          <scope>provided</scope>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.geronimo.components</groupId>
-          <artifactId>geronimo-connector</artifactId>
-          <version>3.1.1</version>
-          <scope>provided</scope>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.aries.blueprint</groupId>
-          <artifactId>org.apache.aries.blueprint.core</artifactId>
-          <version>1.0.0</version>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.xbean</groupId>
-          <artifactId>xbean-blueprint</artifactId>
-          <version>3.7</version>
-          <optional>true</optional>
-      </dependency>
-      <dependency>
+        <dependency>
+            <groupId>org.tranql</groupId>
+            <artifactId>tranql-connector</artifactId>
+            <version>1.8</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.components</groupId>
+            <artifactId>geronimo-connector</artifactId>
+            <version>3.1.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.core</artifactId>
+            <version>1.0.0</version>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xbean</groupId>
+            <artifactId>xbean-blueprint</artifactId>
+            <version>3.7</version>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-simple</artifactId>
             <scope>test</scope>
@@ -118,7 +122,7 @@
             <version>1.7</version>
             <optional>true</optional>
         </dependency>
-  </dependencies>
+    </dependencies>
 
     <build>
         <plugins>
@@ -140,7 +144,6 @@
             <plugin>
                 <groupId>org.apache.aries.versioning</groupId>
                 <artifactId>org.apache.aries.versioning.plugin</artifactId>
-                <version>0.1.0</version>
                 <executions>
                     <execution>
                         <id>default-verify</id>
@@ -148,12 +151,10 @@
                         <goals>
                             <goal>version-check</goal>
                         </goals>
-                        <configuration>
-                            <oldArtifact>org.apache.aries.transaction:org.apache.aries.transaction.jdbc:1.0.0</oldArtifact>
-                        </configuration>
                     </execution>
                 </executions>
             </plugin>
         </plugins>
     </build>
+
 </project>

Modified: aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/RecoverableDataSource.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/RecoverableDataSource.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/RecoverableDataSource.java (original)
+++ aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/RecoverableDataSource.java Mon Jun 30 16:54:57 2014
@@ -19,11 +19,14 @@
 package org.apache.aries.transaction.jdbc;
 
 import org.apache.aries.transaction.AriesTransactionManager;
+import org.apache.aries.transaction.jdbc.internal.AbstractMCFFactory;
 import org.apache.aries.transaction.jdbc.internal.ConnectionManagerFactory;
+import org.apache.aries.transaction.jdbc.internal.DataSourceMCFFactory;
 import org.apache.aries.transaction.jdbc.internal.Recovery;
 import org.apache.aries.transaction.jdbc.internal.XADataSourceMCFFactory;
 import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
 
+import javax.sql.CommonDataSource;
 import javax.sql.DataSource;
 import javax.sql.XADataSource;
 import java.io.PrintWriter;
@@ -42,7 +45,7 @@ import java.sql.SQLFeatureNotSupportedEx
  */
 public class RecoverableDataSource implements DataSource {
 
-    private XADataSource dataSource;
+    private CommonDataSource dataSource;
     private AriesTransactionManager transactionManager;
     private String name;
     private String exceptionSorter = "all";
@@ -55,7 +58,10 @@ public class RecoverableDataSource imple
     private boolean pooling = true;
     private int poolMaxSize = 10;
     private int poolMinSize = 0;
-    private String transaction = "xa";
+    private String transaction;
+    private boolean validateOnMatch = true;
+    private boolean backgroundValidation = false;
+    private int backgroundValidationMilliseconds = 600000;
 
     private DataSource delegate;
 
@@ -68,11 +74,11 @@ public class RecoverableDataSource imple
     }
 
     /**
-     * The XADataSource to wrap.
+     * The CommonDataSource to wrap.
      *
      * @org.apache.xbean.Property required=true
      */
-    public void setDataSource(XADataSource dataSource) {
+    public void setDataSource(CommonDataSource dataSource) {
         this.dataSource = dataSource;
     }
 
@@ -149,6 +155,30 @@ public class RecoverableDataSource imple
         this.poolMinSize = poolMinSize;
     }
 
+     /**
+     * If validation on connection matching is enabled (defaults to true).
+     * @param validateOnMatch
+     */
+    public void setValidateOnMatch(boolean validateOnMatch) {
+        this.validateOnMatch = validateOnMatch;
+    }
+
+    /**
+     * If periodically background validation is enabled (defaults to false).
+     * @param backgroundValidation
+     */
+    public void setBackgroundValidation(boolean backgroundValidation) {
+        this.backgroundValidation = backgroundValidation;
+    }
+
+    /**
+     * Background validation period (defaults to 600000)
+     * @param backgroundValidationMilliseconds
+     */
+    public void setBackgroundValidationMilliseconds(int backgroundValidationMilliseconds) {
+        this.backgroundValidationMilliseconds = backgroundValidationMilliseconds;
+    }
+
     /**
      * Transaction support.
      * Can be none, local or xa (defaults to xa).
@@ -161,7 +191,20 @@ public class RecoverableDataSource imple
      * @org.apache.xbean.InitMethod
      */
     public void start() throws Exception {
-        XADataSourceMCFFactory mcf = new XADataSourceMCFFactory();
+        AbstractMCFFactory mcf;
+        if (dataSource instanceof XADataSource) {
+            mcf = new XADataSourceMCFFactory();
+            if (transaction == null) {
+                transaction = "xa";
+            }
+        } else if (dataSource instanceof DataSource) {
+            mcf = new DataSourceMCFFactory();
+            if (transaction == null) {
+                transaction = "local";
+            }
+        } else {
+            throw new IllegalArgumentException("dataSource must be of type javax.sql.DataSource/XADataSource");
+        }
         mcf.setDataSource(dataSource);
         mcf.setExceptionSorterAsString(exceptionSorter);
         mcf.setUserName(username);
@@ -178,12 +221,17 @@ public class RecoverableDataSource imple
         cm.setPooling(pooling);
         cm.setPoolMaxSize(poolMaxSize);
         cm.setPoolMinSize(poolMinSize);
+        cm.setValidateOnMatch(validateOnMatch);
+        cm.setBackgroundValidation(backgroundValidation);
+        cm.setBackgroundValidationMilliseconds(backgroundValidationMilliseconds);
         cm.setTransaction(transaction);
         cm.init();
 
         delegate = (DataSource) mcf.getConnectionFactory().createConnectionFactory(cm.getConnectionManager());
 
-        Recovery.recover(name, dataSource, transactionManager);
+        if (dataSource instanceof XADataSource) {
+            Recovery.recover(name, (XADataSource) dataSource, transactionManager);
+        }
     }
 
     //---------------------------

Modified: aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ConnectionManagerFactory.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ConnectionManagerFactory.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ConnectionManagerFactory.java (original)
+++ aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ConnectionManagerFactory.java Mon Jun 30 16:54:57 2014
@@ -32,6 +32,7 @@ import org.apache.geronimo.connector.out
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator;
 import org.apache.geronimo.connector.outbound.connectiontracking.GeronimoTransactionListener;
 import org.apache.geronimo.transaction.manager.TransactionManagerMonitor;
+import org.tranql.connector.UserPasswordManagedConnectionFactory;
 
 import javax.resource.spi.ConnectionManager;
 import javax.resource.spi.ManagedConnectionFactory;
@@ -53,6 +54,10 @@ public class ConnectionManagerFactory {
     private int connectionMaxWaitMilliseconds = 5000;
     private int connectionMaxIdleMinutes = 15;
 
+    private boolean validateOnMatch = true;
+    private boolean backgroundValidation = false;
+    private int backgroundValidationMilliseconds = 600000;
+
     private SubjectSource subjectSource;
 
     private ConnectionTrackingCoordinator connectionTracker;
@@ -136,16 +141,34 @@ public class ConnectionManagerFactory {
             transactionManager.addTransactionAssociationListener(transactionManagerMonitor);
         }
         if (connectionManager == null) {
-            // Instantiate the Geronimo Connection Manager
-            connectionManager = new GenericConnectionManager(
-                    transactionSupport,
-                    poolingSupport,
-                    subjectSource,
-                    connectionTracker,
-                    transactionManager,
-                    managedConnectionFactory,
-                    getClass().getName(),
-                    getClass().getClassLoader());
+            if (validateOnMatch || backgroundValidation) {
+                // Wrap the original ManagedConnectionFactory to add validation capability
+                managedConnectionFactory = new ValidatingDelegatingManagedConnectionFactory((UserPasswordManagedConnectionFactory) managedConnectionFactory);
+            }
+            if (backgroundValidation) {
+                // Instantiate the Validating Connection Manager
+                connectionManager = new ValidatingGenericConnectionManager(
+                        transactionSupport,
+                        poolingSupport,
+                        subjectSource,
+                        connectionTracker,
+                        transactionManager,
+                        managedConnectionFactory,
+                        getClass().getName(),
+                        getClass().getClassLoader(),
+                        backgroundValidationMilliseconds);
+            } else {
+                // Instantiate the Geronimo Connection Manager
+                connectionManager = new GenericConnectionManager(
+                        transactionSupport,
+                        poolingSupport,
+                        subjectSource,
+                        connectionTracker,
+                        transactionManager,
+                        managedConnectionFactory,
+                        getClass().getName(),
+                        getClass().getClassLoader());
+            }
 
             connectionManager.doStart();
         }
@@ -257,6 +280,30 @@ public class ConnectionManagerFactory {
         this.connectionMaxIdleMinutes = connectionMaxIdleMinutes;
     }
 
+    public boolean isValidateOnMatch() {
+        return validateOnMatch;
+    }
+
+    public void setValidateOnMatch(boolean validateOnMatch) {
+        this.validateOnMatch = validateOnMatch;
+    }
+
+    public boolean isBackgroundValidation() {
+        return backgroundValidation;
+    }
+
+    public void setBackgroundValidation(boolean backgroundValidation) {
+        this.backgroundValidation = backgroundValidation;
+    }
+
+    public int getBackgroundValidationMilliseconds() {
+        return backgroundValidationMilliseconds;
+    }
+
+    public void setBackgroundValidationMilliseconds(int backgroundValidationMilliseconds) {
+        this.backgroundValidationMilliseconds = backgroundValidationMilliseconds;
+    }
+
     public SubjectSource getSubjectSource() {
         return subjectSource;
     }

Modified: aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ManagedDataSourceFactory.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ManagedDataSourceFactory.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ManagedDataSourceFactory.java (original)
+++ aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/ManagedDataSourceFactory.java Mon Jun 30 16:54:57 2014
@@ -112,6 +112,9 @@ public class ManagedDataSourceFactory {
         cm.setPooling(getBool("aries.xa.pooling", true));
         cm.setPoolMaxSize(getInt("aries.xa.poolMaxSize", 10));
         cm.setPoolMinSize(getInt("aries.xa.poolMinSize", 0));
+        cm.setValidateOnMatch(getBool("aries.xa.validateOnMatch", true));
+        cm.setBackgroundValidation(getBool("aries.xa.backgroundValidation", false));
+        cm.setBackgroundValidationMilliseconds(getInt("aries.xa.backgroundValidationMilliseconds", 600000));
         cm.setTransaction(getString("aries.xa.transaction", "xa"));
         cm.init();
 

Modified: aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/XADataSourceMCFFactory.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/XADataSourceMCFFactory.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/XADataSourceMCFFactory.java (original)
+++ aries/branches/subsystemsR6/transaction/transaction-jdbc/src/main/java/org/apache/aries/transaction/jdbc/internal/XADataSourceMCFFactory.java Mon Jun 30 16:54:57 2014
@@ -19,32 +19,28 @@
 package org.apache.aries.transaction.jdbc.internal;
 
 import org.tranql.connector.AllExceptionsAreFatalSorter;
+import org.tranql.connector.CredentialExtractor;
 import org.tranql.connector.ExceptionSorter;
 import org.tranql.connector.NoExceptionsAreFatalSorter;
 import org.tranql.connector.jdbc.AbstractXADataSourceMCF;
 import org.tranql.connector.jdbc.ConfigurableSQLStateExceptionSorter;
 import org.tranql.connector.jdbc.KnownSQLStateExceptionSorter;
 
+import javax.resource.ResourceException;
 import javax.resource.spi.ManagedConnectionFactory;
+import javax.resource.spi.ResourceAdapterInternalException;
+import javax.resource.spi.TransactionSupport;
+import javax.sql.XAConnection;
 import javax.sql.XADataSource;
+
+import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.List;
 
-public class XADataSourceMCFFactory {
-
-    private XADataSource dataSource;
-    private ExceptionSorter exceptionSorter = new AllExceptionsAreFatalSorter();
-    private String userName;
-    private String password;
-
-    private ManagedConnectionFactory connectionFactory;
-
-    public ManagedConnectionFactory getConnectionFactory() {
-        return connectionFactory;
-    }
+public class XADataSourceMCFFactory extends AbstractMCFFactory {
 
     public void init() throws Exception {
-        if (dataSource == null) {
+        if (getDataSource() == null) {
             throw new IllegalArgumentException("dataSource must be set");
         }
         if (connectionFactory == null) {
@@ -52,70 +48,39 @@ public class XADataSourceMCFFactory {
         }
     }
 
-    public void setExceptionSorterAsString(String sorter) {
-        if ("all".equalsIgnoreCase(sorter)) {
-            this.exceptionSorter = new AllExceptionsAreFatalSorter();
-        } else if ("none".equalsIgnoreCase(sorter)) {
-            this.exceptionSorter = new NoExceptionsAreFatalSorter();
-        } else if ("known".equalsIgnoreCase(sorter)) {
-            this.exceptionSorter = new KnownSQLStateExceptionSorter();
-        } else if (sorter.toLowerCase().startsWith("custom(") && sorter.endsWith(")")) {
-            List<String> states = new ArrayList<String>();
-            for (String s : sorter.substring(7, sorter.length() - 2).split(",")) {
-                if (s != null && s.length() > 0) {
-                    states.add(s);
-                }
-            }
-            this.exceptionSorter = new ConfigurableSQLStateExceptionSorter(states);
-        } else {
-            throw new IllegalArgumentException("Unknown exceptionSorter " + sorter);
-        }
-    }
-
-    public XADataSource getDataSource() {
-        return dataSource;
-    }
-
-    public void setDataSource(XADataSource dataSource) {
-        this.dataSource = dataSource;
-    }
-
-    public ExceptionSorter getExceptionSorter() {
-        return exceptionSorter;
-    }
-
-    public void setExceptionSorter(ExceptionSorter exceptionSorter) {
-        this.exceptionSorter = exceptionSorter;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public class XADataSourceMCF extends AbstractXADataSourceMCF<XADataSource> {
+    public class XADataSourceMCF extends AbstractXADataSourceMCF<XADataSource> implements TransactionSupport {
 
         public XADataSourceMCF() {
-            super(XADataSourceMCFFactory.this.dataSource, XADataSourceMCFFactory.this.exceptionSorter);
+            super((XADataSource) XADataSourceMCFFactory.this.getDataSource(), XADataSourceMCFFactory.this.getExceptionSorter());
         }
 
         public String getUserName() {
-            return userName;
+            return XADataSourceMCFFactory.this.getUserName();
         }
 
+        @Override
         public String getPassword() {
-            return password;
+            return XADataSourceMCFFactory.this.getPassword();
+        }
+
+        @Override
+        protected XAConnection getPhysicalConnection(CredentialExtractor credentialExtractor) throws ResourceException {
+            try {
+                String userName = credentialExtractor.getUserName();
+                String password = credentialExtractor.getPassword();
+                if (userName != null) {
+                    return xaDataSource.getXAConnection(userName, password);
+                } else {
+                    return xaDataSource.getXAConnection();
+                }
+            } catch (SQLException e) {
+                throw new ResourceAdapterInternalException("Unable to obtain physical connection to " + xaDataSource, e);
+            }
+        }
+
+        @Override
+        public TransactionSupportLevel getTransactionSupport() {
+            return TransactionSupportLevel.XATransaction;
         }
     }
 

Modified: aries/branches/subsystemsR6/transaction/transaction-jms/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/transaction/transaction-jms/pom.xml?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/transaction/transaction-jms/pom.xml (original)
+++ aries/branches/subsystemsR6/transaction/transaction-jms/pom.xml Mon Jun 30 16:54:57 2014
@@ -19,28 +19,30 @@
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
+    <modelVersion>4.0.0</modelVersion>
+
     <parent>
         <groupId>org.apache.aries</groupId>
-        <artifactId>java5-parent</artifactId>
-        <version>1.0.0</version>
-        <relativePath />
+        <artifactId>parent</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
-    <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.aries.transaction</groupId>
     <artifactId>org.apache.aries.transaction.jms</artifactId>
     <packaging>bundle</packaging>
     <name>Apache Aries JMS Pool</name>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-jms</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-jms</developerConnection>
+        <url>http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-jms</url>
+    </scm>
 
-     <scm>
-         <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-jms</connection>
-         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/transaction/transaction-jms</developerConnection>
-         <url>http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-jms</url>
-     </scm>
     <properties>
         <aries.osgi.export>
-            org.apache.aries.transaction.jms;version="1.0.0";-noimport:=true
+            org.apache.aries.transaction.jms;version="2.0.0";-noimport:=true
         </aries.osgi.export>
         <aries.osgi.import>
             *
@@ -48,13 +50,14 @@
         <aries.osgi.private.pkg>
             org.apache.aries.transaction.jms.internal
         </aries.osgi.private.pkg>
+        <lastReleaseVersion>1.0.0</lastReleaseVersion>
     </properties>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.aries.transaction</groupId>
             <artifactId>org.apache.aries.transaction.manager</artifactId>
-            <version>1.0.0</version>
+            <version>1.1.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
@@ -64,12 +67,11 @@
         <dependency>
             <groupId>commons-pool</groupId>
             <artifactId>commons-pool</artifactId>
-            <version>1.5.2</version>
+            <version>1.6</version>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
-            <version>1.5.11</version>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
@@ -92,7 +94,6 @@
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-simple</artifactId>
-            <version>1.5.11</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
@@ -102,14 +103,14 @@
             <plugin>
                 <groupId>org.apache.xbean</groupId>
                 <artifactId>maven-xbean-plugin</artifactId>
-                <version>3.11</version>
+                <version>3.18</version>
                 <executions>
                     <execution>
                         <goals>
                             <goal>mapping</goal>
                         </goals>
                         <configuration>
-                            <namespace>http://aries.apache.org/xmlns/transaction-jms/1.0</namespace>
+                            <namespace>http://aries.apache.org/xmlns/transaction-jms/2.0</namespace>
                         </configuration>
                     </execution>
                 </executions>
@@ -117,7 +118,6 @@
             <plugin>
                 <groupId>org.apache.aries.versioning</groupId>
                 <artifactId>org.apache.aries.versioning.plugin</artifactId>
-                <version>0.1.0</version>
                 <executions>
                     <execution>
                         <id>default-verify</id>
@@ -125,9 +125,6 @@
                         <goals>
                             <goal>version-check</goal>
                         </goals>
-                        <configuration>
-                            <oldArtifact>org.apache.aries.transaction:org.apache.aries.transaction.jms:1.0.0</oldArtifact>
-                        </configuration>
                     </execution>
                 </executions>
             </plugin>



Mime
View raw message