JBoss-OSGI SVN: r95708 - in projects/jboss-osgi/trunk: testsuite/example/scripts and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-28 17:23:55 -0400 (Wed, 28 Oct 2009)
New Revision: 95708
Added:
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/bundle/
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/bundle/TransactionActivator.java
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta.bnd
Removed:
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionManagerTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/UserTransactionTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/tm/
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-tm.bnd
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-ut.bnd
Modified:
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/TransactionCapability.java
projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml
Log:
Complete the JTA example
Modified: 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 2009-10-28 21:10:38 UTC (rev 95707)
+++ projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/TransactionCapability.java 2009-10-28 21:23:55 UTC (rev 95708)
@@ -27,6 +27,8 @@
import org.jboss.osgi.spi.capability.Capability;
+import com.arjuna.ats.arjuna.common.Environment;
+
/**
* Adds the Transaction capability to the {@link OSGiRuntime}
* under test.
@@ -44,6 +46,8 @@
{
super(TransactionManager.class.getName());
+ addSystemProperty(Environment.OBJECTSTORE_DIR, "target/ObjectStore");
+
addBundle("bundles/jboss-osgi-jta.jar");
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml 2009-10-28 21:10:38 UTC (rev 95707)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml 2009-10-28 21:23:55 UTC (rev 95708)
@@ -59,8 +59,7 @@
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-jndi.jar" files="${tests.resources.dir}/jndi/example-jndi.bnd" />
<!-- jta -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-jta-tm.jar" files="${tests.resources.dir}/jta/example-jta-tm.bnd" />
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-jta-ut.jar" files="${tests.resources.dir}/jta/example-jta-ut.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-jta.jar" files="${tests.resources.dir}/jta/example-jta.bnd" />
<!-- mcservice -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-mcservice-bundleA.jar" files="${tests.resources.dir}/mcservice/example-mcservice-bundleA.bnd" />
Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionManagerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionManagerTestCase.java 2009-10-28 21:10:38 UTC (rev 95707)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionManagerTestCase.java 2009-10-28 21:23:55 UTC (rev 95708)
@@ -1,72 +0,0 @@
-/*
- * 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.jta;
-
-//$Id$
-
-import static org.junit.Assert.assertEquals;
-
-import org.jboss.osgi.husky.HuskyCapability;
-import org.jboss.osgi.jta.TransactionCapability;
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTestHelper;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-
-/**
- * An example of OSGi JTA.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 23-Oct-2009
- */
-public class TransactionManagerTestCase
-{
- private OSGiRuntime runtime;
-
- @Before
- public void setUp() throws Exception
- {
- runtime = new OSGiTestHelper().getDefaultRuntime();
- runtime.addCapability(new HuskyCapability());
- runtime.addCapability(new TransactionCapability());
- }
-
- @After
- public void tearDown() throws Exception
- {
- runtime.shutdown();
- runtime = null;
- }
-
- @Test
- public void testTransactionManager() throws Exception
- {
- OSGiBundle bundle = runtime.installBundle("example-jta-tm.jar");
- assertEquals(Bundle.INSTALLED, bundle.getState());
-
- bundle.start();
- assertEquals(Bundle.ACTIVE, bundle.getState());
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionTestCase.java (from rev 95685, projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/UserTransactionTestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionTestCase.java 2009-10-28 21:23:55 UTC (rev 95708)
@@ -0,0 +1,72 @@
+/*
+ * 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.jta;
+
+//$Id$
+
+import static org.junit.Assert.*;
+
+import org.jboss.osgi.husky.HuskyCapability;
+import org.jboss.osgi.jta.TransactionCapability;
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTestHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ * An example of OSGi JTA.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Oct-2009
+ */
+public class TransactionTestCase
+{
+ private OSGiRuntime runtime;
+
+ @Before
+ public void setUp() throws Exception
+ {
+ runtime = new OSGiTestHelper().getDefaultRuntime();
+ runtime.addCapability(new HuskyCapability());
+ runtime.addCapability(new TransactionCapability());
+ }
+
+ @After
+ public void tearDown() throws Exception
+ {
+ runtime.shutdown();
+ runtime = null;
+ }
+
+ @Test
+ public void testUserTransaction() throws Exception
+ {
+ OSGiBundle bundle = runtime.installBundle("example-jta.jar");
+ assertEquals(Bundle.INSTALLED, bundle.getState());
+
+ bundle.start();
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/UserTransactionTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/UserTransactionTestCase.java 2009-10-28 21:10:38 UTC (rev 95707)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/UserTransactionTestCase.java 2009-10-28 21:23:55 UTC (rev 95708)
@@ -1,72 +0,0 @@
-/*
- * 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.jta;
-
-//$Id$
-
-import static org.junit.Assert.*;
-
-import org.jboss.osgi.husky.HuskyCapability;
-import org.jboss.osgi.jta.TransactionCapability;
-import org.jboss.osgi.testing.OSGiBundle;
-import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTestHelper;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-
-/**
- * An example of OSGi JTA.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 23-Oct-2009
- */
-public class UserTransactionTestCase
-{
- private OSGiRuntime runtime;
-
- @Before
- public void setUp() throws Exception
- {
- runtime = new OSGiTestHelper().getDefaultRuntime();
- runtime.addCapability(new HuskyCapability());
- runtime.addCapability(new TransactionCapability());
- }
-
- @After
- public void tearDown() throws Exception
- {
- runtime.shutdown();
- runtime = null;
- }
-
- @Test
- public void testUserTransaction() throws Exception
- {
- OSGiBundle bundle = runtime.installBundle("example-jta-ut.jar");
- assertEquals(Bundle.INSTALLED, bundle.getState());
-
- bundle.start();
- assertEquals(Bundle.ACTIVE, bundle.getState());
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/bundle/TransactionActivator.java (from rev 95699, projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/bundle/TransactionActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/bundle/TransactionActivator.java 2009-10-28 21:23:55 UTC (rev 95708)
@@ -0,0 +1,119 @@
+/*
+ * 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.jta.bundle;
+
+//$Id$
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import javax.transaction.UserTransaction;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * An example of OSGi JTA.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Oct-2009
+ */
+public class TransactionActivator implements BundleActivator
+{
+ public void start(BundleContext context) throws Exception
+ {
+ ServiceReference sref = context.getServiceReference(UserTransaction.class.getName());
+ assertNotNull("UserTransaction service not null", sref);
+
+ UserTransaction userTx = (UserTransaction)context.getService(sref);
+ assertNotNull("UserTransaction not null", userTx);
+
+ Transactional txObj = new Transactional();
+
+ userTx.begin();
+ try
+ {
+ txObj.register(context);
+
+ txObj.setMessage("Hello World");
+ assertNull("Uncommited message null", txObj.getMessage());
+
+ userTx.commit();
+ }
+ catch (Exception e)
+ {
+ userTx.setRollbackOnly();
+ }
+
+ assertEquals("Hello World", txObj.getMessage());
+ }
+
+ public void stop(BundleContext context) throws Exception
+ {
+ }
+
+ class Transactional implements Synchronization
+ {
+ private String volatileMessage;
+ private String message;
+
+ public void beforeCompletion()
+ {
+ }
+
+ public void afterCompletion(int status)
+ {
+ if (status == Status.STATUS_COMMITTED)
+ message = volatileMessage;
+ }
+
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public void setMessage(String message)
+ {
+ this.volatileMessage = message;
+ }
+
+ void register(BundleContext context) throws Exception
+ {
+ ServiceReference sref = context.getServiceReference(TransactionManager.class.getName());
+ assertNotNull("TransactionManager service not null", sref);
+
+ TransactionManager tm = (TransactionManager)context.getService(sref);
+ assertNotNull("TransactionManager not null", tm);
+
+ Transaction tx = tm.getTransaction();
+ assertNotNull("Transaction not null", tx);
+
+ tx.registerSynchronization(this);
+ }
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-tm.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-tm.bnd 2009-10-28 21:10:38 UTC (rev 95707)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-tm.bnd 2009-10-28 21:23:55 UTC (rev 95708)
@@ -1,6 +0,0 @@
-# bnd build -classpath target/test-classes -output target/test-libs/example-jta-tm.jar src/test/resources/jta/example-jta-tm.bnd
-
-Bundle-SymbolicName: example-jta-tm
-Bundle-Activator: org.jboss.test.osgi.example.jta.tm.TransactionManagerActivator
-Private-Package: org.jboss.test.osgi.example.jta.tm
-Import-Package: javax.transaction, org.junit, org.osgi.framework
Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-ut.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-ut.bnd 2009-10-28 21:10:38 UTC (rev 95707)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-ut.bnd 2009-10-28 21:23:55 UTC (rev 95708)
@@ -1,6 +0,0 @@
-# bnd build -classpath target/test-classes -output target/test-libs/example-jta-ut.jar src/test/resources/jta/example-jta-ut.bnd
-
-Bundle-SymbolicName: example-jta-ut
-Bundle-Activator: org.jboss.test.osgi.example.jta.ut.UserTransactionActivator
-Private-Package: org.jboss.test.osgi.example.jta.ut
-Import-Package: javax.transaction, org.junit, org.osgi.framework
Copied: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta.bnd (from rev 95685, projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-ut.bnd)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta.bnd 2009-10-28 21:23:55 UTC (rev 95708)
@@ -0,0 +1,6 @@
+# bnd build -classpath target/test-classes -output target/test-libs/example-jta.jar src/test/resources/jta/example-jta.bnd
+
+Bundle-SymbolicName: example-jta
+Bundle-Activator: org.jboss.test.osgi.example.jta.bundle.TransactionActivator
+Private-Package: org.jboss.test.osgi.example.jta.bundle
+Import-Package: javax.transaction, org.junit, org.osgi.framework
16 years, 1 month
JBoss-OSGI SVN: r95707 - in projects/jboss-osgi/projects/bundles/apache-xerces/trunk: src/main/java/org/jboss/osgi/xml and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-28 17:10:38 -0400 (Wed, 28 Oct 2009)
New Revision: 95707
Modified:
projects/jboss-osgi/projects/bundles/apache-xerces/trunk/pom.xml
projects/jboss-osgi/projects/bundles/apache-xerces/trunk/src/main/java/org/jboss/osgi/xml/XMLParserCapability.java
Log:
update versions
Modified: projects/jboss-osgi/projects/bundles/apache-xerces/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/apache-xerces/trunk/pom.xml 2009-10-28 21:01:09 UTC (rev 95706)
+++ projects/jboss-osgi/projects/bundles/apache-xerces/trunk/pom.xml 2009-10-28 21:10:38 UTC (rev 95707)
@@ -27,15 +27,15 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-parent</artifactId>
- <version>1.0.2</version>
+ <version>1.0.4-SNAPSHOT</version>
</parent>
<properties>
<version.apache.xerces>2.9.1</version.apache.xerces>
- <version.jboss.osgi.common>1.0.1</version.jboss.osgi.common>
+ <version.jboss.osgi.common>1.0.3-SNAPSHOT</version.jboss.osgi.common>
<version.wutka.dtdparser>1.2.1</version.wutka.dtdparser>
<version.xml.resolver>1.2</version.xml.resolver>
- <version.osgi>r4v42</version.osgi>
+ <version.osgi>4.2.0</version.osgi>
</properties>
<dependencies>
Modified: projects/jboss-osgi/projects/bundles/apache-xerces/trunk/src/main/java/org/jboss/osgi/xml/XMLParserCapability.java
===================================================================
--- projects/jboss-osgi/projects/bundles/apache-xerces/trunk/src/main/java/org/jboss/osgi/xml/XMLParserCapability.java 2009-10-28 21:01:09 UTC (rev 95706)
+++ projects/jboss-osgi/projects/bundles/apache-xerces/trunk/src/main/java/org/jboss/osgi/xml/XMLParserCapability.java 2009-10-28 21:10:38 UTC (rev 95707)
@@ -27,7 +27,6 @@
import org.jboss.osgi.spi.capability.Capability;
import org.jboss.osgi.spi.capability.LogServiceCapability;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
/**
* Adds the XML parser capability to the {@link OSGiRuntime} under test.
16 years, 1 month
JBoss-OSGI SVN: r95699 - in projects/jboss-osgi/trunk: reactor/jta/src/main/java/org/jboss/osgi/jta/internal and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-28 14:06:43 -0400 (Wed, 28 Oct 2009)
New Revision: 95699
Modified:
projects/jboss-osgi/trunk/reactor/jta/pom.xml
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/UserTransactionServiceFactory.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java
Log:
Fix JTA UserTransactionTest
Modified: projects/jboss-osgi/trunk/reactor/jta/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-28 17:51:54 UTC (rev 95698)
+++ projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-28 18:06:43 UTC (rev 95699)
@@ -51,19 +51,11 @@
<groupId>jboss.jbossts</groupId>
<artifactId>jbossjts</artifactId>
<version>${version.jboss.jbossts}</version>
- <!--
- <scope>system</scope>
- <systemPath>/home/tdiesler/svn/jboss-osgi/trunk/reactor/jta/jbossjts.jar</systemPath>
- -->
</dependency>
<dependency>
<groupId>jboss.jbossts</groupId>
<artifactId>jbossts-common</artifactId>
<version>${version.jboss.jbossts}</version>
- <!--
- <scope>system</scope>
- <systemPath>/home/tdiesler/svn/jboss-osgi/trunk/reactor/jta/jbossts-common.jar</systemPath>
- -->
</dependency>
<!-- OSGi Dependencies -->
Modified: 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 2009-10-28 17:51:54 UTC (rev 95698)
+++ projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/TransactionServiceActivator.java 2009-10-28 18:06:43 UTC (rev 95699)
@@ -31,8 +31,6 @@
import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceRegistration;
-import com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction;
-
/**
* A transaction services activator
*
@@ -51,9 +49,6 @@
{
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
- class BaseTransactionHack extends BaseTransaction {};
- new BaseTransactionHack();
-
// Register the TransactionManager service
TransactionManager tm = com.arjuna.ats.jta.TransactionManager.transactionManager();
transactionManagerReg = context.registerService(TransactionManager.class.getName(), tm, null);
Modified: projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/UserTransactionServiceFactory.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/UserTransactionServiceFactory.java 2009-10-28 17:51:54 UTC (rev 95698)
+++ projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/UserTransactionServiceFactory.java 2009-10-28 18:06:43 UTC (rev 95699)
@@ -44,8 +44,17 @@
public Object getService(Bundle bundle, ServiceRegistration registration)
{
ClassLoader classLoader = getClass().getClassLoader();
- UserTransactionProxy handler = new UserTransactionProxy(classLoader);
- return Proxy.newProxyInstance(classLoader, new Class[] { UserTransaction.class }, handler);
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ UserTransactionProxy handler = new UserTransactionProxy(classLoader);
+ return Proxy.newProxyInstance(classLoader, new Class[] { UserTransaction.class }, handler);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
}
public void ungetService(Bundle bundle, ServiceRegistration registration, Object service)
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java 2009-10-28 17:51:54 UTC (rev 95698)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java 2009-10-28 18:06:43 UTC (rev 95699)
@@ -24,9 +24,7 @@
//$Id$
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertEquals;
-import javax.transaction.Status;
import javax.transaction.UserTransaction;
import org.osgi.framework.BundleActivator;
@@ -53,13 +51,15 @@
try
{
doStuff();
+
tx.commit();
}
catch (Exception e)
{
tx.setRollbackOnly();
}
- assertEquals(Status.STATUS_COMMITTED, tx.getStatus());
+
+ // assertEquals(Status.STATUS_COMMITTED, tx.getStatus());
}
public void stop(BundleContext context) throws Exception
16 years, 1 month
JBoss-OSGI SVN: r95683 - in projects/jboss-osgi/trunk: reactor/jta/src/main/java/org/jboss/osgi/jta/internal and 2 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-28 10:57:49 -0400 (Wed, 28 Oct 2009)
New Revision: 95683
Added:
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/UserTransactionServiceFactory.java
Modified:
projects/jboss-osgi/trunk/reactor/jta/pom.xml
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/TransactionServiceActivator.java
projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/UserTransactionTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java
Log:
More work on JTA integration
Modified: projects/jboss-osgi/trunk/reactor/jta/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-28 14:17:58 UTC (rev 95682)
+++ projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-28 14:57:49 UTC (rev 95683)
@@ -51,11 +51,19 @@
<groupId>jboss.jbossts</groupId>
<artifactId>jbossjts</artifactId>
<version>${version.jboss.jbossts}</version>
+ <!--
+ <scope>system</scope>
+ <systemPath>/home/tdiesler/svn/jboss-osgi/trunk/reactor/jta/jbossjts.jar</systemPath>
+ -->
</dependency>
<dependency>
<groupId>jboss.jbossts</groupId>
<artifactId>jbossts-common</artifactId>
<version>${version.jboss.jbossts}</version>
+ <!--
+ <scope>system</scope>
+ <systemPath>/home/tdiesler/svn/jboss-osgi/trunk/reactor/jta/jbossts-common.jar</systemPath>
+ -->
</dependency>
<!-- OSGi Dependencies -->
@@ -101,9 +109,11 @@
javax.management,
javax.naming,
javax.naming.spi,
+ javax.transaction,
javax.xml.parsers,
org.apache.commons.logging,
org.jboss.osgi.spi.capability,
+ org.jboss.osgi.spi.util,
org.osgi.framework,
org.w3c.dom,
Modified: 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 2009-10-28 14:17:58 UTC (rev 95682)
+++ projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/TransactionServiceActivator.java 2009-10-28 14:57:49 UTC (rev 95683)
@@ -28,8 +28,11 @@
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceFactory;
import org.osgi.framework.ServiceRegistration;
+import com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction;
+
/**
* A transaction services activator
*
@@ -48,13 +51,16 @@
{
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+ class BaseTransactionHack extends BaseTransaction {};
+ new BaseTransactionHack();
+
// 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);
+ ServiceFactory txFactory = new UserTransactionServiceFactory();
+ userTransactionReg = context.registerService(UserTransaction.class.getName(), txFactory, null);
}
finally
{
Added: projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/UserTransactionServiceFactory.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/UserTransactionServiceFactory.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/UserTransactionServiceFactory.java 2009-10-28 14:57:49 UTC (rev 95683)
@@ -0,0 +1,84 @@
+/*
+ * 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 java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import javax.transaction.UserTransaction;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.ServiceFactory;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * A service factory for the user transaction
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 28-Oct-2009
+ */
+public class UserTransactionServiceFactory implements ServiceFactory
+{
+ public Object getService(Bundle bundle, ServiceRegistration registration)
+ {
+ ClassLoader classLoader = getClass().getClassLoader();
+ UserTransactionProxy handler = new UserTransactionProxy(classLoader);
+ return Proxy.newProxyInstance(classLoader, new Class[] { UserTransaction.class }, handler);
+ }
+
+ public void ungetService(Bundle bundle, ServiceRegistration registration, Object service)
+ {
+ // nothing to do
+ }
+
+ /**
+ * Wraps every invocation on the UserTransaction to make the context class loader available
+ */
+ class UserTransactionProxy implements InvocationHandler
+ {
+ private UserTransaction tx;
+ private ClassLoader classLoader;
+
+ public UserTransactionProxy(ClassLoader classLoader)
+ {
+ this.tx = com.arjuna.ats.jta.UserTransaction.userTransaction();
+ this.classLoader = classLoader;
+ }
+
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ return method.invoke(tx, args);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/UserTransactionServiceFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/UserTransactionTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/UserTransactionTestCase.java 2009-10-28 14:17:58 UTC (rev 95682)
+++ projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/UserTransactionTestCase.java 2009-10-28 14:57:49 UTC (rev 95683)
@@ -29,6 +29,8 @@
import org.junit.Test;
+import com.arjuna.common.util.propertyservice.plugins.PropertyManagerIOPlugin;
+
/**
* Test basic JBossTM operations
*
@@ -42,5 +44,14 @@
{
UserTransaction ut = com.arjuna.ats.jta.UserTransaction.userTransaction();
assertNotNull("UserTransaction not null", ut);
+
+ /*
+ System.out.println("");
+ new RuntimeException().printStackTrace(System.out);
+ System.out.println("Thread: " + Thread.currentThread() + " - " + Thread.currentThread().getContextClassLoader());
+ System.out.println("PropertyManager: " + this);
+ System.out.println("PropertyManager: " + getClass().getClassLoader());
+ System.out.println("PropertyManagerIOPlugin: " + PropertyManagerIOPlugin.class.getClassLoader());
+ */
}
}
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java 2009-10-28 14:17:58 UTC (rev 95682)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java 2009-10-28 14:57:49 UTC (rev 95683)
@@ -49,17 +49,17 @@
UserTransaction tx = (UserTransaction)context.getService(sref);
assertNotNull("UserTransaction not null", tx);
-// tx.begin();
-// try
-// {
-// doStuff();
-// tx.commit();
-// }
-// catch (Exception e)
-// {
-// tx.setRollbackOnly();
-// }
-// assertEquals(Status.STATUS_COMMITTED, tx.getStatus());
+ tx.begin();
+ try
+ {
+ doStuff();
+ tx.commit();
+ }
+ catch (Exception e)
+ {
+ tx.setRollbackOnly();
+ }
+ assertEquals(Status.STATUS_COMMITTED, tx.getStatus());
}
public void stop(BundleContext context) throws Exception
16 years, 1 month
JBoss-OSGI SVN: r95636 - in projects/jboss-osgi/trunk: reactor/jta/src/main/java/org/jboss/osgi/jta/internal and 7 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-27 18:21:52 -0400 (Tue, 27 Oct 2009)
New Revision: 95636
Added:
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionManagerTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/UserTransactionTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/tm/
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/tm/TransactionManagerActivator.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-tm.bnd
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-ut.bnd
Removed:
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/transaction/
Modified:
projects/jboss-osgi/trunk/reactor/jta/pom.xml
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/TransactionServiceActivator.java
projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml
Log:
Enable basic JTA tests
Modified: projects/jboss-osgi/trunk/reactor/jta/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-27 21:38:54 UTC (rev 95635)
+++ projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-27 22:21:52 UTC (rev 95636)
@@ -33,7 +33,7 @@
<!-- Properties -->
<properties>
<version.jboss.jta.api>1.0.1.GA</version.jboss.jta.api>
- <version.jboss.jbossts>4.4.0.GA</version.jboss.jbossts>
+ <version.jboss.jbossts>4.6.1.GA</version.jboss.jbossts>
</properties>
<!-- Dependencies -->
@@ -49,7 +49,7 @@
</dependency>
<dependency>
<groupId>jboss.jbossts</groupId>
- <artifactId>jbossjta</artifactId>
+ <artifactId>jbossjts</artifactId>
<version>${version.jboss.jbossts}</version>
</dependency>
<dependency>
@@ -103,23 +103,29 @@
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,
+ <!-- excludes -->
+ !com.arjuna.ArjunaOTS,
+ !com.arjuna.ats.internal*,
+ !javax.resource.spi,
+ !javax.resource.spi.work,
+ !javax.sql,
+ !javax.swing,
+ !javax.swing.tree,
+ !oracle.jdbc.xa,
+ !oracle.jdbc.xa.client,
+ !oracle.sql,
+ !org.apache.log4j,
+ !org.apache.xml.serialize,
+ !org.omg.*,
</Import-Package>
<Embed-Transitive>true</Embed-Transitive>
<Embed-Dependency>
jboss-transaction-api;inline=false,
- jbossjta;inline=false,
+ jbossjts;inline=false,
jbossts-common;inline=false,
</Embed-Dependency>
<_exportcontents>
Modified: 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 2009-10-27 21:38:54 UTC (rev 95635)
+++ projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/jboss/osgi/jta/internal/TransactionServiceActivator.java 2009-10-27 22:21:52 UTC (rev 95636)
@@ -43,13 +43,23 @@
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);
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+
+ // 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);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
}
public void stop(BundleContext context)
Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml 2009-10-27 21:38:54 UTC (rev 95635)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml 2009-10-27 22:21:52 UTC (rev 95636)
@@ -57,6 +57,10 @@
<!-- jndi -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-jndi.jar" files="${tests.resources.dir}/jndi/example-jndi.bnd" />
+
+ <!-- jta -->
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-jta-tm.jar" files="${tests.resources.dir}/jta/example-jta-tm.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-jta-ut.jar" files="${tests.resources.dir}/jta/example-jta-ut.bnd" />
<!-- mcservice -->
<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-mcservice-bundleA.jar" files="${tests.resources.dir}/mcservice/example-mcservice-bundleA.bnd" />
Copied: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionManagerTestCase.java (from rev 95620, 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/jta/TransactionManagerTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionManagerTestCase.java 2009-10-27 22:21:52 UTC (rev 95636)
@@ -0,0 +1,72 @@
+/*
+ * 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.jta;
+
+//$Id$
+
+import static org.junit.Assert.assertEquals;
+
+import org.jboss.osgi.husky.HuskyCapability;
+import org.jboss.osgi.jta.TransactionCapability;
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTestHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ * An example of OSGi JTA.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Oct-2009
+ */
+public class TransactionManagerTestCase
+{
+ private OSGiRuntime runtime;
+
+ @Before
+ public void setUp() throws Exception
+ {
+ runtime = new OSGiTestHelper().getDefaultRuntime();
+ runtime.addCapability(new HuskyCapability());
+ runtime.addCapability(new TransactionCapability());
+ }
+
+ @After
+ public void tearDown() throws Exception
+ {
+ runtime.shutdown();
+ runtime = null;
+ }
+
+ @Test
+ public void testTransactionManager() throws Exception
+ {
+ OSGiBundle bundle = runtime.installBundle("example-jta-tm.jar");
+ assertEquals(Bundle.INSTALLED, bundle.getState());
+
+ bundle.start();
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/UserTransactionTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/UserTransactionTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/UserTransactionTestCase.java 2009-10-27 22:21:52 UTC (rev 95636)
@@ -0,0 +1,72 @@
+/*
+ * 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.jta;
+
+//$Id$
+
+import static org.junit.Assert.*;
+
+import org.jboss.osgi.husky.HuskyCapability;
+import org.jboss.osgi.jta.TransactionCapability;
+import org.jboss.osgi.testing.OSGiBundle;
+import org.jboss.osgi.testing.OSGiRuntime;
+import org.jboss.osgi.testing.OSGiTestHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ * An example of OSGi JTA.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Oct-2009
+ */
+public class UserTransactionTestCase
+{
+ private OSGiRuntime runtime;
+
+ @Before
+ public void setUp() throws Exception
+ {
+ runtime = new OSGiTestHelper().getDefaultRuntime();
+ runtime.addCapability(new HuskyCapability());
+ runtime.addCapability(new TransactionCapability());
+ }
+
+ @After
+ public void tearDown() throws Exception
+ {
+ runtime.shutdown();
+ runtime = null;
+ }
+
+ @Test
+ public void testUserTransaction() throws Exception
+ {
+ OSGiBundle bundle = runtime.installBundle("example-jta-ut.jar");
+ assertEquals(Bundle.INSTALLED, bundle.getState());
+
+ bundle.start();
+ assertEquals(Bundle.ACTIVE, bundle.getState());
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/UserTransactionTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/tm/TransactionManagerActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/tm/TransactionManagerActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/tm/TransactionManagerActivator.java 2009-10-27 22:21:52 UTC (rev 95636)
@@ -0,0 +1,54 @@
+/*
+ * 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.jta.tm;
+
+//$Id$
+
+import static org.junit.Assert.assertNotNull;
+
+import javax.transaction.TransactionManager;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * An example of OSGi JTA.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Oct-2009
+ */
+public class TransactionManagerActivator implements BundleActivator
+{
+ public void start(BundleContext context) throws Exception
+ {
+ ServiceReference sref = context.getServiceReference(TransactionManager.class.getName());
+ assertNotNull("TransactionManager service not null", sref);
+
+ TransactionManager tm = (TransactionManager)context.getService(sref);
+ assertNotNull("TransactionManager not null", tm);
+ }
+
+ public void stop(BundleContext context) 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/jta/tm/TransactionManagerActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java 2009-10-27 22:21:52 UTC (rev 95636)
@@ -0,0 +1,73 @@
+/*
+ * 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.jta.ut;
+
+//$Id$
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertEquals;
+
+import javax.transaction.Status;
+import javax.transaction.UserTransaction;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * An example of OSGi JTA.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 23-Oct-2009
+ */
+public class UserTransactionActivator implements BundleActivator
+{
+ public void start(BundleContext context) throws Exception
+ {
+ ServiceReference sref = context.getServiceReference(UserTransaction.class.getName());
+ assertNotNull("UserTransaction service not null", sref);
+
+ UserTransaction tx = (UserTransaction)context.getService(sref);
+ assertNotNull("UserTransaction not null", tx);
+
+// tx.begin();
+// try
+// {
+// doStuff();
+// tx.commit();
+// }
+// catch (Exception e)
+// {
+// tx.setRollbackOnly();
+// }
+// assertEquals(Status.STATUS_COMMITTED, tx.getStatus());
+ }
+
+ public void stop(BundleContext context) throws Exception
+ {
+ }
+
+ private void doStuff()
+ {
+ // do stuff transactional
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/ut/UserTransactionActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-tm.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-tm.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-tm.bnd 2009-10-27 22:21:52 UTC (rev 95636)
@@ -0,0 +1,6 @@
+# bnd build -classpath target/test-classes -output target/test-libs/example-jta-tm.jar src/test/resources/jta/example-jta-tm.bnd
+
+Bundle-SymbolicName: example-jta-tm
+Bundle-Activator: org.jboss.test.osgi.example.jta.tm.TransactionManagerActivator
+Private-Package: org.jboss.test.osgi.example.jta.tm
+Import-Package: javax.transaction, org.junit, org.osgi.framework
Added: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-ut.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-ut.bnd (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jta/example-jta-ut.bnd 2009-10-27 22:21:52 UTC (rev 95636)
@@ -0,0 +1,6 @@
+# bnd build -classpath target/test-classes -output target/test-libs/example-jta-ut.jar src/test/resources/jta/example-jta-ut.bnd
+
+Bundle-SymbolicName: example-jta-ut
+Bundle-Activator: org.jboss.test.osgi.example.jta.ut.UserTransactionActivator
+Private-Package: org.jboss.test.osgi.example.jta.ut
+Import-Package: javax.transaction, org.junit, org.osgi.framework
16 years, 1 month
JBoss-OSGI SVN: r95622 - in projects/jboss-osgi/trunk: reactor/jta/src and 8 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-27 13:39:01 -0400 (Tue, 27 Oct 2009)
New Revision: 95622
Added:
projects/jboss-osgi/trunk/reactor/jta/src/test/
projects/jboss-osgi/trunk/reactor/jta/src/test/java/
projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/
projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/
projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/
projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/
projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/
projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/TransactionManagerTestCase.java
projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/UserTransactionTestCase.java
Modified:
projects/jboss-osgi/trunk/reactor/jta/.classpath
projects/jboss-osgi/trunk/reactor/jta/pom.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppInterceptorTestCase.java
Log:
Add basic JTA bootstrap tests
Modified: projects/jboss-osgi/trunk/reactor/jta/.classpath
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/.classpath 2009-10-27 17:26:51 UTC (rev 95621)
+++ projects/jboss-osgi/trunk/reactor/jta/.classpath 2009-10-27 17:39:01 UTC (rev 95622)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
Modified: projects/jboss-osgi/trunk/reactor/jta/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-27 17:26:51 UTC (rev 95621)
+++ projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-27 17:39:01 UTC (rev 95622)
@@ -69,6 +69,18 @@
<artifactId>org.osgi.compendium</artifactId>
<scope>provided</scope>
</dependency>
+
+ <!-- Test Dependecies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
Added: projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/TransactionManagerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/TransactionManagerTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/TransactionManagerTestCase.java 2009-10-27 17:39:01 UTC (rev 95622)
@@ -0,0 +1,46 @@
+/*
+ * 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.jta;
+
+//$Id$
+
+import static org.junit.Assert.*;
+
+import javax.transaction.TransactionManager;
+
+import org.junit.Test;
+
+/**
+ * Test basic JBossTM operations
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 19-Oct-2009
+ */
+public class TransactionManagerTestCase
+{
+ @Test
+ public void testTransactionManagerBootstrap()
+ {
+ TransactionManager tm = com.arjuna.ats.jta.TransactionManager.transactionManager();
+ assertNotNull("TransactionManager not null", tm);
+ }
+}
Property changes on: projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/TransactionManagerTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/UserTransactionTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/UserTransactionTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/UserTransactionTestCase.java 2009-10-27 17:39:01 UTC (rev 95622)
@@ -0,0 +1,46 @@
+/*
+ * 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.jta;
+
+//$Id$
+
+import static org.junit.Assert.assertNotNull;
+
+import javax.transaction.UserTransaction;
+
+import org.junit.Test;
+
+/**
+ * Test basic JBossTM operations
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 19-Oct-2009
+ */
+public class UserTransactionTestCase
+{
+ @Test
+ public void testUserTransactionBootstrap()
+ {
+ UserTransaction ut = com.arjuna.ats.jta.UserTransaction.userTransaction();
+ assertNotNull("UserTransaction not null", ut);
+ }
+}
Property changes on: projects/jboss-osgi/trunk/reactor/jta/src/test/java/org/jboss/test/osgi/jta/UserTransactionTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppInterceptorTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppInterceptorTestCase.java 2009-10-27 17:26:51 UTC (rev 95621)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppInterceptorTestCase.java 2009-10-27 17:39:01 UTC (rev 95622)
@@ -66,21 +66,21 @@
public void testResourceAccess() throws Exception
{
// FIXME: http://issues.ops4j.org/browse/PAXWEB-182
- String line = getHttpResponse("/message.txt", 30000);
+ String line = getHttpResponse("/message.txt", 20000);
assertEquals("Hello from Resource", line);
}
@Test
public void testServletAccess() throws Exception
{
- String line = getHttpResponse("/servlet?test=plain");
+ String line = getHttpResponse("/servlet?test=plain", 20000);
assertEquals("Hello from Servlet", line);
}
@Test
public void testServletInitProps() throws Exception
{
- String line = getHttpResponse("/servlet?test=initProp");
+ String line = getHttpResponse("/servlet?test=initProp", 20000);
assertEquals("initProp=SomeValue", line);
}
}
\ No newline at end of file
16 years, 1 month
JBoss-OSGI SVN: r95621 - projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-27 13:26:51 -0400 (Tue, 27 Oct 2009)
New Revision: 95621
Modified:
projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java
Log:
add("javax.management.openmbean")
Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java 2009-10-27 16:52:08 UTC (rev 95620)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/plugins/internal/SystemPackagesPluginImpl.java 2009-10-27 17:26:51 UTC (rev 95621)
@@ -68,6 +68,7 @@
allPackages.add("javax.management");
allPackages.add("javax.management.remote");
+ allPackages.add("javax.management.openmbean");
allPackages.add("javax.naming");
allPackages.add("javax.naming.event");
16 years, 1 month
JBoss-OSGI SVN: r95610 - in projects/jboss-osgi/trunk: distribution/javadoc/scripts and 7 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)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(a)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(a)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>
16 years, 1 month
JBoss-OSGI SVN: r95609 - in projects/jboss-osgi/trunk: reactor and 7 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)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/projec...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi/projects/...</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(a)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>
16 years, 1 month
JBoss-OSGI SVN: r95608 - in projects/jboss-osgi/trunk/reactor: jta and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-10-27 06:40:24 -0400 (Tue, 27 Oct 2009)
New Revision: 95608
Added:
projects/jboss-osgi/trunk/reactor/jta/
projects/jboss-osgi/trunk/reactor/jta/pom.xml
Removed:
projects/jboss-osgi/trunk/reactor/jta/pom.xml
projects/jboss-osgi/trunk/reactor/jta/src/main/java/org/
Log:
Add JTA
Copied: projects/jboss-osgi/trunk/reactor/jta (from rev 95606, projects/jboss-osgi/trunk/reactor/jmx)
Deleted: projects/jboss-osgi/trunk/reactor/jta/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/jmx/pom.xml 2009-10-27 10:26:58 UTC (rev 95606)
+++ projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-27 10:40:24 UTC (rev 95608)
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
- <!-- ====================================================================== -->
- <!-- -->
- <!-- JBoss, the OpenSource J2EE webOS -->
- <!-- -->
- <!-- Distributable under LGPL license. -->
- <!-- See terms of license at http://www.gnu.org. -->
- <!-- -->
- <!-- ====================================================================== -->
-
- <!-- $Id$ -->
-
-<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>
-
- <name>JBossOSGi Bundles - JMX</name>
- <description>The JBossOSGi MBeanServer Service</description>
-
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-jmx</artifactId>
- <packaging>bundle</packaging>
-
- <version>1.0.2-SNAPSHOT</version>
-
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-parent</artifactId>
- <version>1.0.4-SNAPSHOT</version>
- </parent>
-
- <!-- Properties -->
- <properties>
- <version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
- <version.jboss.osgi.jndi>1.0.1</version.jboss.osgi.jndi>
- <version.osgi>4.2.0</version.osgi>
- </properties>
-
- <!-- Dependencies -->
- <dependencies>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-jndi</artifactId>
- <version>${version.jboss.osgi.jndi}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-common-core</artifactId>
- <version>${version.jboss.osgi.common.core}</version>
- </dependency>
-
- <!-- OSGi Dependencies -->
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>${version.osgi}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>${version.osgi}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <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>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <!-- Subversion -->
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi/projec...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi/projects/...</developerConnection>
- <url>http://fisheye.jboss.com/qsearch/JBossOSGi/projects/bundles/jmx/trunk</url>
- </scm>
-
-</project>
Copied: projects/jboss-osgi/trunk/reactor/jta/pom.xml (from rev 95607, projects/jboss-osgi/trunk/reactor/jmx/pom.xml)
===================================================================
--- projects/jboss-osgi/trunk/reactor/jta/pom.xml (rev 0)
+++ projects/jboss-osgi/trunk/reactor/jta/pom.xml 2009-10-27 10:40:24 UTC (rev 95608)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+ <!-- ====================================================================== -->
+ <!-- -->
+ <!-- JBoss, the OpenSource J2EE webOS -->
+ <!-- -->
+ <!-- Distributable under LGPL license. -->
+ <!-- See terms of license at http://www.gnu.org. -->
+ <!-- -->
+ <!-- ====================================================================== -->
+
+ <!-- $Id$ -->
+
+<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>
+
+ <name>JBossOSGi Reactor - JTA</name>
+ <description>The JBossOSGi Management</description>
+
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-jta</artifactId>
+ <packaging>bundle</packaging>
+
+ <version>1.0.0-SNAPSHOT</version>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi</artifactId>
+ <version>1.0.0.Beta5</version>
+ </parent>
+
+ <!-- Properties -->
+ <properties>
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-jndi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-common-core</artifactId>
+ </dependency>
+
+ <!-- OSGi Dependencies -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <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>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- Subversion -->
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi/projec...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi/projects/...</developerConnection>
+ <url>http://fisheye.jboss.com/qsearch/JBossOSGi/projects/bundles/jmx/trunk</url>
+ </scm>
+
+</project>
16 years, 1 month