[jboss-cvs] JBossAS SVN: r95609 - in projects/jboss-osgi/trunk: reactor and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 27 09:14:51 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-27 09:14:51 -0400 (Tue, 27 Oct 2009)
New Revision: 95609
Added:
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/TransactionServiceActivator.java
Modified:
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/reactor/jta/pom.xml
projects/jboss-osgi/trunk/reactor/pom.xml
Log:
Add basic JTA integration
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-10-27 10:40:24 UTC (rev 95608)
+++ projects/jboss-osgi/trunk/pom.xml 2009-10-27 13:14:51 UTC (rev 95609)
@@ -59,8 +59,9 @@
<version.jboss.osgi.hotdeploy>1.0.3-SNAPSHOT</version.jboss.osgi.hotdeploy>
<version.jboss.osgi.husky>1.0.1</version.jboss.osgi.husky>
<version.jboss.osgi.jaxb>2.1.10.SP2</version.jboss.osgi.jaxb>
- <version.jboss.osgi.jmx>1.0.1</version.jboss.osgi.jmx>
+ <version.jboss.osgi.jmx>1.0.2-SNAPSHOT</version.jboss.osgi.jmx>
<version.jboss.osgi.jndi>1.0.1</version.jboss.osgi.jndi>
+ <version.jboss.osgi.jta>1.0.0-SNAPSHOT</version.jboss.osgi.jta>
<version.jboss.osgi.microcontainer>2.0.9-SNAPSHOT</version.jboss.osgi.microcontainer>
<version.jboss.osgi.runtime.deployers>1.0.3-SNAPSHOT</version.jboss.osgi.runtime.deployers>
<version.jboss.osgi.runtime.equinox>3.5-SNAPSHOT</version.jboss.osgi.runtime.equinox>
@@ -150,6 +151,11 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-jta</artifactId>
+ <version>${version.jboss.osgi.jta}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-microcontainer</artifactId>
<version>${version.jboss.osgi.microcontainer}</version>
</dependency>
Modified: projects/jboss-osgi/trunk/reactor/jta/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-27 10:40:24 UTC (rev 95608)
+++ projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-27 13:14:51 UTC (rev 95609)
@@ -15,7 +15,7 @@
<modelVersion>4.0.0</modelVersion>
<name>JBossOSGi Reactor - JTA</name>
- <description>The JBossOSGi Management</description>
+ <description>The JBossOSGi Transaction Service</description>
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-jta</artifactId>
@@ -32,17 +32,21 @@
<!-- Properties -->
<properties>
+ <version.jboss.jta.api>1.0.1.GA</version.jboss.jta.api>
+ <version.jboss.jbossts>4.4.0.GA</version.jboss.jbossts>
</properties>
<!-- Dependencies -->
<dependencies>
<dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-jndi</artifactId>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-transaction-api</artifactId>
+ <version>${version.jboss.jta.api}</version>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-common-core</artifactId>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossjta</artifactId>
+ <version>${version.jboss.jbossts}</version>
</dependency>
<!-- OSGi Dependencies -->
@@ -67,49 +71,20 @@
<configuration>
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.jmx.internal.JMXServiceActivator</Bundle-Activator>
- <Export-Package>
- org.jboss.osgi.jmx;version=${version}
- </Export-Package>
- <Import-Package>
-
- <!-- system -->
- javax.management*,
- javax.naming,
- javax.naming.spi,
-
- <!-- jboss-osgi -->
- org.jboss.osgi.common.log;version=1.0,
- org.jboss.osgi.spi.capability;version=1.0,
- org.jboss.osgi.spi.management;version=1.0,
-
- <!-- osgi -->
- org.osgi.framework;version=1.4,
- org.osgi.service.log,
- org.osgi.util.tracker,
-
- <!-- FIXME optional -->
- org.jboss.osgi.jndi,
- org.jboss.net.sockets,
- org.jnp.interfaces,
-
- <!--
- org.jboss.osgi.jndi;resolution:=optional,
- org.jboss.net.sockets;resolution:=optional,
- org.jnp.interfaces;resolution:=optional,
- -->
- </Import-Package>
+ <Bundle-Activator>org.jboss.osgi.jta.internal.TransactionServiceActivator</Bundle-Activator>
+ <Private-Package>org.jboss.osgi.jta.internal</Private-Package>
+ <Embed-Transitive>true</Embed-Transitive>
+ <Embed-Dependency>
+ jboss-transaction-api;inline=false,
+ jbossjta;inline=false,
+ </Embed-Dependency>
+ <_exportcontents>
+ javax.transaction;version=1.0.1,
+ </_exportcontents>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
- <!-- Subversion -->
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi/projects/bundles/jmx/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi/projects/bundles/jmx/trunk</developerConnection>
- <url>http://fisheye.jboss.com/qsearch/JBossOSGi/projects/bundles/jmx/trunk</url>
- </scm>
-
</project>
Added: projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/TransactionServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/TransactionServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/TransactionServiceActivator.java 2009-10-27 13:14:51 UTC (rev 95609)
@@ -0,0 +1,69 @@
+/*
+ * 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.internal;
+
+//$Id$
+
+import javax.transaction.TransactionManager;
+import javax.transaction.UserTransaction;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * A transaction services activator
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 27-Oct-2009
+ */
+public class TransactionServiceActivator implements BundleActivator
+{
+ private ServiceRegistration userTransactionReg;
+ private ServiceRegistration transactionManagerReg;
+
+ public void start(BundleContext context)
+ {
+ // Register the TransactionManager service
+ TransactionManager tm = com.arjuna.ats.jta.TransactionManager.transactionManager();
+ transactionManagerReg = context.registerService(TransactionManager.class.getName(), tm, null);
+
+ // Register the UserTransaction service
+ UserTransaction ut = com.arjuna.ats.jta.UserTransaction.userTransaction();
+ userTransactionReg = context.registerService(UserTransaction.class.getName(), ut, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ if (userTransactionReg != null)
+ {
+ userTransactionReg.unregister();
+ userTransactionReg = null;
+ }
+
+ if (transactionManagerReg != null)
+ {
+ transactionManagerReg.unregister();
+ transactionManagerReg = null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/TransactionServiceActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/reactor/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/pom.xml 2009-10-27 10:40:24 UTC (rev 95608)
+++ projects/jboss-osgi/trunk/reactor/pom.xml 2009-10-27 13:14:51 UTC (rev 95609)
@@ -47,6 +47,7 @@
<module>testing</module>
<module>blueprint</module>
<module>jmx</module>
+ <module>jta</module>
</modules>
<profiles>
More information about the jboss-cvs-commits
mailing list