[jboss-cvs] JBossAS SVN: r95610 - in projects/jboss-osgi/trunk: distribution/javadoc/scripts and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 27 09:53:37 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-27 09:53:37 -0400 (Tue, 27 Oct 2009)
New Revision: 95610
Added:
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/TransactionCapability.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/transaction/
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/transaction/TransactionTestCase.java
Modified:
projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml
projects/jboss-osgi/trunk/distribution/pom.xml
projects/jboss-osgi/trunk/reactor/jmx/pom.xml
projects/jboss-osgi/trunk/reactor/jta/pom.xml
projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Add TransactionTestCase
Modified: projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml 2009-10-27 13:14:51 UTC (rev 95609)
+++ projects/jboss-osgi/trunk/distribution/javadoc/scripts/assembly-javadoc-src.xml 2009-10-27 13:53:37 UTC (rev 95610)
@@ -21,6 +21,7 @@
<include>*:jboss-osgi-jaxb:jar:sources</include>
<include>*:jboss-osgi-jmx:jar:sources</include>
<include>*:jboss-osgi-jndi:jar:sources</include>
+ <include>*:jboss-osgi-jta:jar:sources</include>
<include>*:jboss-osgi-microcontainer:jar:sources</include>
<include>*:jboss-osgi-spi:jar:sources</include>
<include>*:jboss-osgi-testing:jar:sources</include>
Modified: projects/jboss-osgi/trunk/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/pom.xml 2009-10-27 13:14:51 UTC (rev 95609)
+++ projects/jboss-osgi/trunk/distribution/pom.xml 2009-10-27 13:53:37 UTC (rev 95610)
@@ -231,6 +231,22 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-jta</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-jta</artifactId>
+ <version>${version.jboss.osgi.jta}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-jta</artifactId>
+ <version>${version.jboss.osgi.jta}</version>
+ <classifier>javadoc</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-microcontainer</artifactId>
</dependency>
<dependency>
Modified: projects/jboss-osgi/trunk/reactor/jmx/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/jmx/pom.xml 2009-10-27 13:14:51 UTC (rev 95609)
+++ projects/jboss-osgi/trunk/reactor/jmx/pom.xml 2009-10-27 13:53:37 UTC (rev 95610)
@@ -102,6 +102,29 @@
</instructions>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <!-- For some reason the distribution javadoc module needs this -->
+ <file>target/${artifactId}-${version}-sources.jar</file>
+ <classifier>sources</classifier>
+ <type>jar</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Modified: projects/jboss-osgi/trunk/reactor/jta/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-27 13:14:51 UTC (rev 95609)
+++ projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-27 13:53:37 UTC (rev 95610)
@@ -39,6 +39,10 @@
<!-- Dependencies -->
<dependencies>
<dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-spi</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-transaction-api</artifactId>
<version>${version.jboss.jta.api}</version>
@@ -48,6 +52,11 @@
<artifactId>jbossjta</artifactId>
<version>${version.jboss.jbossts}</version>
</dependency>
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossts-common</artifactId>
+ <version>${version.jboss.jbossts}</version>
+ </dependency>
<!-- OSGi Dependencies -->
<dependency>
@@ -72,11 +81,34 @@
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
<Bundle-Activator>org.jboss.osgi.jta.internal.TransactionServiceActivator</Bundle-Activator>
+ <Export-Package>
+ org.jboss.osgi.jta;version=${version}
+ </Export-Package>
<Private-Package>org.jboss.osgi.jta.internal</Private-Package>
+ <Import-Package>
+ javax.management,
+ javax.naming,
+ javax.naming.spi,
+ javax.xml.parsers,
+ org.apache.commons.logging,
+ org.apache.log4j,
+ org.jboss.osgi.spi.capability,
+ org.osgi.framework,
+ org.w3c.dom,
+
+ <!-- exclude -->
+ !javax.resource.spi*,
+ !javax.sql,
+ !javax.swing*,
+ !oracle.jdbc.xa*,
+ !oracle.sql,
+ !org.apache.xml.serialize,
+ </Import-Package>
<Embed-Transitive>true</Embed-Transitive>
<Embed-Dependency>
jboss-transaction-api;inline=false,
jbossjta;inline=false,
+ jbossts-common;inline=false,
</Embed-Dependency>
<_exportcontents>
javax.transaction;version=1.0.1,
@@ -84,6 +116,29 @@
</instructions>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <!-- For some reason the distribution javadoc module needs this -->
+ <file>target/${artifactId}-${version}-sources.jar</file>
+ <classifier>sources</classifier>
+ <type>jar</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Added: projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/TransactionCapability.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/TransactionCapability.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/TransactionCapability.java 2009-10-27 13:53:37 UTC (rev 95610)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.jta;
+
+//$Id$
+
+import javax.transaction.TransactionManager;
+
+import org.jboss.osgi.spi.capability.Capability;
+
+/**
+ * Adds the Transaction capability to the {@link OSGiRuntime}
+ * under test.
+ *
+ * It is ignored if the {@link TransactionManager} service is already registered.
+ *
+ * Installed bundles: jboss-osgi-jta.jar
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 27-Oct-2009
+ */
+public class TransactionCapability extends Capability
+{
+ public TransactionCapability()
+ {
+ super(TransactionManager.class.getName());
+
+ addBundle("bundles/jboss-osgi-jta.jar");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/TransactionCapability.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-10-27 13:14:51 UTC (rev 95609)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-10-27 13:53:37 UTC (rev 95610)
@@ -23,6 +23,7 @@
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
<include>*:jboss-osgi-jndi:jar</include>
+ <include>*:jboss-osgi-jta:jar</include>
<include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
<include>*:jboss-osgi-webapp:jar</include>
Added: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/transaction/TransactionTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/transaction/TransactionTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/transaction/TransactionTestCase.java 2009-10-27 13:53:37 UTC (rev 95610)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.example.transaction;
+
+//$Id$
+
+import org.jboss.osgi.jta.TransactionCapability;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTestHelper;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * An example of OSGi JTA.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Oct-2009
+ */
+public class TransactionTestCase
+{
+ private static OSGiRuntime runtime;
+
+ @BeforeClass
+ public static void setUpClass() throws Exception
+ {
+ runtime = new OSGiTestHelper().getDefaultRuntime();
+ //runtime.addCapability(new TransactionCapability());
+ }
+
+ @AfterClass
+ public static void tearDownClass() throws Exception
+ {
+ runtime.shutdown();
+ runtime = null;
+ }
+
+ @Test
+ public void testTransactionManager() throws Exception
+ {
+ }
+
+ @Test
+ public void testUserTransaction() throws Exception
+ {
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/transaction/TransactionTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-10-27 13:14:51 UTC (rev 95609)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-10-27 13:53:37 UTC (rev 95610)
@@ -134,6 +134,11 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-jta</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-webapp</artifactId>
<scope>provided</scope>
</dependency>
More information about the jboss-cvs-commits
mailing list