[jboss-svn-commits] JBL Code SVN: r34795 - in labs/jbosstm/trunk/XTS: WS-T/dev/src11/com/arjuna/wst11/messaging/deploy and 3 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Aug 19 11:34:00 EDT 2010


Author: adinn
Date: 2010-08-19 11:34:00 -0400 (Thu, 19 Aug 2010)
New Revision: 34795

Added:
   labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/WSTCoordinatorInitialisation.java
   labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/WSTParticipantInitialisation.java
Removed:
   labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/TransactionInitialisation.java
Modified:
   labs/jbosstm/trunk/XTS/WS-T/dev/dd/ws-t11_web-app.xml
   labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mw/wst11/deploy/WSTXInitialisation.java
   labs/jbosstm/trunk/XTS/config/xts-properties.xml
   labs/jbosstm/trunk/XTS/config/xts-properties11.xml
   labs/jbosstm/trunk/XTS/sar/META-INF/xts-jboss-beans.xml
   labs/jbosstm/trunk/XTS/sar/META-INF/xts11-jboss-beans.xml
Log:
separated out WST initialisation into two independent listeners for coordinator and participant and modified documentation in propery and jboss beans xml confg files -- fixes for JBTM-777

Modified: labs/jbosstm/trunk/XTS/WS-T/dev/dd/ws-t11_web-app.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/dd/ws-t11_web-app.xml	2010-08-19 14:40:46 UTC (rev 34794)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/dd/ws-t11_web-app.xml	2010-08-19 15:34:00 UTC (rev 34795)
@@ -65,8 +65,11 @@
     
     <!-- Initialise WS-T  1.1 -->
     <listener>
-        <listener-class>com.arjuna.wst11.messaging.deploy.TransactionInitialisation</listener-class>
+        <listener-class>com.arjuna.wst11.messaging.deploy.WSTCoordinatorInitialisation</listener-class>
     </listener>
+    <listener>
+        <listener-class>com.arjuna.wst11.messaging.deploy.WSTParticipantInitialisation</listener-class>
+    </listener>
 
     <!-- Close the WS-T  1.1 initialisation list -->
     <listener>

Deleted: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/TransactionInitialisation.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/TransactionInitialisation.java	2010-08-19 14:40:46 UTC (rev 34794)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/TransactionInitialisation.java	2010-08-19 15:34:00 UTC (rev 34795)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * See the copyright.txt in the distribution for a full listing 
- * of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package com.arjuna.wst11.messaging.deploy;
-
-import com.arjuna.services.framework.startup.Sequencer;
-import com.arjuna.webservices11.wsarjtx.processors.TerminationCoordinatorProcessor;
-import com.arjuna.webservices11.wsat.processors.CompletionCoordinatorProcessor;
-import com.arjuna.webservices11.wsat.processors.CoordinatorProcessor;
-import com.arjuna.webservices11.wsat.processors.ParticipantProcessor;
-import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionCoordinatorProcessor;
-import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionParticipantProcessor;
-import com.arjuna.webservices11.wsba.processors.ParticipantCompletionCoordinatorProcessor;
-import com.arjuna.webservices11.wsba.processors.ParticipantCompletionParticipantProcessor;
-import com.arjuna.wst11.messaging.*;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-
-/**
- * Initialise the transaction services.
- * @author kevin
- */
-public class TransactionInitialisation implements ServletContextListener
-{
-    /**
-     * The context has been initialized.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextInitialized(final ServletContextEvent servletContextEvent)
-    {
-        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
-           public void run() {
-               CompletionCoordinatorProcessor.setProcessor(new CompletionCoordinatorProcessorImpl()) ;
-               ParticipantProcessor.setProcessor(new ParticipantProcessorImpl()) ;
-               CoordinatorProcessor.setProcessor(new CoordinatorProcessorImpl()) ;
-               TerminationCoordinatorProcessor.setProcessor(new TerminationCoordinatorProcessorImpl()) ;
-               CoordinatorCompletionParticipantProcessor.setProcessor(new CoordinatorCompletionParticipantProcessorImpl()) ;
-               ParticipantCompletionParticipantProcessor.setProcessor(new ParticipantCompletionParticipantProcessorImpl()) ;
-               CoordinatorCompletionCoordinatorProcessor.setProcessor(new CoordinatorCompletionCoordinatorProcessorImpl()) ;
-               ParticipantCompletionCoordinatorProcessor.setProcessor(new ParticipantCompletionCoordinatorProcessorImpl()) ;
-           }
-        };
-    }
-
-    /**
-     * The context is about to be destroyed.
-     * @param servletContextEvent The servlet context event.
-     */
-    public void contextDestroyed(final ServletContextEvent servletContextEvent)
-    {
-    }
-}
\ No newline at end of file

Copied: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/WSTCoordinatorInitialisation.java (from rev 34704, labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/TransactionInitialisation.java)
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/WSTCoordinatorInitialisation.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/WSTCoordinatorInitialisation.java	2010-08-19 15:34:00 UTC (rev 34795)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst11.messaging.deploy;
+
+import com.arjuna.services.framework.startup.Sequencer;
+import com.arjuna.webservices11.wsarjtx.processors.TerminationCoordinatorProcessor;
+import com.arjuna.webservices11.wsat.processors.CompletionCoordinatorProcessor;
+import com.arjuna.webservices11.wsat.processors.CoordinatorProcessor;
+import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionCoordinatorProcessor;
+import com.arjuna.webservices11.wsba.processors.ParticipantCompletionCoordinatorProcessor;
+import com.arjuna.wst11.messaging.*;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+/**
+ * Initialise the transaction corodinator services.
+ * @author kevin
+ */
+public class WSTCoordinatorInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
+           public void run() {
+               CompletionCoordinatorProcessor.setProcessor(new CompletionCoordinatorProcessorImpl()) ;
+               CoordinatorProcessor.setProcessor(new CoordinatorProcessorImpl()) ;
+               TerminationCoordinatorProcessor.setProcessor(new TerminationCoordinatorProcessorImpl()) ;
+               CoordinatorCompletionCoordinatorProcessor.setProcessor(new CoordinatorCompletionCoordinatorProcessorImpl()) ;
+               ParticipantCompletionCoordinatorProcessor.setProcessor(new ParticipantCompletionCoordinatorProcessorImpl()) ;
+           }
+        };
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}
\ No newline at end of file

Added: labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/WSTParticipantInitialisation.java
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/WSTParticipantInitialisation.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-T/dev/src11/com/arjuna/wst11/messaging/deploy/WSTParticipantInitialisation.java	2010-08-19 15:34:00 UTC (rev 34795)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt in the distribution for a full listing 
+ * of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.wst11.messaging.deploy;
+
+import com.arjuna.services.framework.startup.Sequencer;
+import com.arjuna.webservices11.wsat.processors.ParticipantProcessor;
+import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionParticipantProcessor;
+import com.arjuna.webservices11.wsba.processors.ParticipantCompletionParticipantProcessor;
+import com.arjuna.wst11.messaging.*;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+/**
+ * Initialise the transaction participant services.
+ * @author kevin
+ */
+public class WSTParticipantInitialisation implements ServletContextListener
+{
+    /**
+     * The context has been initialized.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextInitialized(final ServletContextEvent servletContextEvent)
+    {
+        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WST11) {
+           public void run() {
+               ParticipantProcessor.setProcessor(new ParticipantProcessorImpl()) ;
+               CoordinatorCompletionParticipantProcessor.setProcessor(new CoordinatorCompletionParticipantProcessorImpl()) ;
+               ParticipantCompletionParticipantProcessor.setProcessor(new ParticipantCompletionParticipantProcessorImpl()) ;
+           }
+        };
+    }
+
+    /**
+     * The context is about to be destroyed.
+     * @param servletContextEvent The servlet context event.
+     */
+    public void contextDestroyed(final ServletContextEvent servletContextEvent)
+    {
+    }
+}
\ No newline at end of file

Modified: labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mw/wst11/deploy/WSTXInitialisation.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mw/wst11/deploy/WSTXInitialisation.java	2010-08-19 14:40:46 UTC (rev 34794)
+++ labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mw/wst11/deploy/WSTXInitialisation.java	2010-08-19 15:34:00 UTC (rev 34795)
@@ -64,7 +64,7 @@
     }
 
     /**
-     * Configure WSTX client implementations.
+     * Configure all configured WSTX client and participant implementations.
      *
      */
     private void configure()
@@ -76,22 +76,20 @@
         final String userBa = wstEnvironmentBean.getUserBusinessActivity11();
         final String baManager = wstEnvironmentBean.getBusinessActivityManager11();
 
-        if ((userTx == null) || (txManager == null) || (userBa == null) || (baManager == null))
-        {
-            // we  allow all the client classes to be null here in case someone wants to deploy a coordinator/server
-            // only implementation. they will still need to install the API classes but not the implementation
-            // code
-            if (! (userTx == null && txManager == null && userBa == null && baManager == null)) {
-                throw new Exception(wstxLogger.i18NLogger.get_mw_wst_deploy_WSTXI_23());
-            }
+        // we only load classes which have been configured
+        
+        if (userTx != null) {
+            UserTransaction.setUserTransaction((UserTransaction)ClassLoaderHelper.forName(getClass(), userTx).newInstance()) ;
         }
-
-        UserTransaction.setUserTransaction((UserTransaction)ClassLoaderHelper.forName(getClass(), userTx).newInstance()) ;
-        TransactionManager.setTransactionManager((TransactionManager)ClassLoaderHelper.forName(getClass(), txManager).newInstance()) ;
-        UserBusinessActivity.setUserBusinessActivity((UserBusinessActivity)ClassLoaderHelper.forName(getClass(), userBa).newInstance()) ;
-        // we only have one choice for the 1.1 business activity manager
-        // BusinessActivityManager.setBusinessActivityManager(BusinessActivityManagerImple.class.newInstance());
-        BusinessActivityManager.setBusinessActivityManager((BusinessActivityManager)ClassLoaderHelper.forName(getClass(), baManager).newInstance());
+        if (txManager != null) {
+            TransactionManager.setTransactionManager((TransactionManager)ClassLoaderHelper.forName(getClass(), txManager).newInstance()) ;
+        }
+        if (userBa != null) {
+            UserBusinessActivity.setUserBusinessActivity((UserBusinessActivity)ClassLoaderHelper.forName(getClass(), userBa).newInstance()) ;
+        }
+        if (baManager != null) {
+            BusinessActivityManager.setBusinessActivityManager((BusinessActivityManager)ClassLoaderHelper.forName(getClass(), baManager).newInstance());
+        }
     }
 
     /**

Modified: labs/jbosstm/trunk/XTS/config/xts-properties.xml
===================================================================
--- labs/jbosstm/trunk/XTS/config/xts-properties.xml	2010-08-19 14:40:46 UTC (rev 34794)
+++ labs/jbosstm/trunk/XTS/config/xts-properties.xml	2010-08-19 15:34:00 UTC (rev 34795)
@@ -152,18 +152,23 @@
 	then you can leave these properties unset and the corresponding
 	classes will  not be loaded.
     -->
-    <!--  mappings for the 1.1 implementation
+    <!--  client mappings for the 1.1 implementation
     -->
     <entry key="org.jboss.jbossts.xts11.wsat.UserTransaction">com.arjuna.mwlabs.wst11.at.remote.UserTransactionImple</entry>
     <entry key="org.jboss.jbossts.xts11.wsba.UserBusinessActivity">com.arjuna.mwlabs.wst11.ba.remote.UserBusinessActivityImple</entry>
+    <!--  participant mappings for the 1.1 implementation
+    -->
     <entry key="org.jboss.jbossts.xts11.wsat.TransactionManager">com.arjuna.mwlabs.wst11.at.remote.TransactionManagerImple</entry>
     <entry key="org.jboss.jbossts.xts11.wsba.BusinessActivityManager">com.arjuna.mwlabs.wst11.ba.remote.BusinessActivityManagerImple</entry>
 
-    <!-- mappings for the 1.0 implementation.  these should only be
+    <!-- client mappings for the 1.0 implementation.  these should only be
          defined if the 1.0 implementation is deployed
 	 -->
     <entry key="org.jboss.jbossts.xts.wsat.UserTransaction">com.arjuna.mwlabs.wst.at.remote.UserTransactionImple</entry>
     <entry key="org.jboss.jbossts.xts.wsba.UserBusinessActivity">com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityImple</entry>
+    <!-- participant mappings for the 1.0 implementation.  these should only be
+         defined if the 1.0 implementation is deployed
+	 -->
     <entry key="org.jboss.jbossts.xts.wsat.TransactionManager">com.arjuna.mwlabs.wst.at.remote.TransactionManagerImple</entry>
     <entry key="org.jboss.jbossts.xts.wsba.BusinessActivityManager">com.arjuna.mwlabs.wst.ba.remote.BusinessActivityManagerImple</entry>
 

Modified: labs/jbosstm/trunk/XTS/config/xts-properties11.xml
===================================================================
--- labs/jbosstm/trunk/XTS/config/xts-properties11.xml	2010-08-19 14:40:46 UTC (rev 34794)
+++ labs/jbosstm/trunk/XTS/config/xts-properties11.xml	2010-08-19 15:34:00 UTC (rev 34795)
@@ -133,10 +133,12 @@
 	then you can leave these properties unset and the corresponding
 	classes will  not be loaded.
     -->
-    <!--  mappings for the 1.1 implementation
+    <!--  client mappings for the 1.1 implementation
     -->
     <entry key="org.jboss.jbossts.xts11.wsat.UserTransaction">com.arjuna.mwlabs.wst11.at.remote.UserTransactionImple</entry>
     <entry key="org.jboss.jbossts.xts11.wsba.UserBusinessActivity">com.arjuna.mwlabs.wst11.ba.remote.UserBusinessActivityImple</entry>
+    <!--  participant mappings for the 1.1 implementation
+    -->
     <entry key="org.jboss.jbossts.xts11.wsat.TransactionManager">com.arjuna.mwlabs.wst11.at.remote.TransactionManagerImple</entry>
     <entry key="org.jboss.jbossts.xts11.wsba.BusinessActivityManager">com.arjuna.mwlabs.wst11.ba.remote.BusinessActivityManagerImple</entry>
 

Modified: labs/jbosstm/trunk/XTS/sar/META-INF/xts-jboss-beans.xml
===================================================================
--- labs/jbosstm/trunk/XTS/sar/META-INF/xts-jboss-beans.xml	2010-08-19 14:40:46 UTC (rev 34794)
+++ labs/jbosstm/trunk/XTS/sar/META-INF/xts-jboss-beans.xml	2010-08-19 15:34:00 UTC (rev 34795)
@@ -221,15 +221,17 @@
         <property name="userTransaction11">
             <value>com.arjuna.mwlabs.wst11.at.remote.UserTransactionImple</value>
         </property>
-        <property name="transactionManager11">
-            <value>com.arjuna.mwlabs.wst11.at.remote.TransactionManagerImple</value>
-        </property>
         <property name="userBusinessActivity11">
             <value>com.arjuna.mwlabs.wst11.ba.remote.UserBusinessActivityImple</value>
         </property>
+        <!-- the 1.1 participant API implementation classes.
+        -->
         <property name="businessActivityManager11">
             <value>com.arjuna.mwlabs.wst11.ba.remote.BusinessActivityManagerImple</value>
         </property>
+        <property name="transactionManager11">
+            <value>com.arjuna.mwlabs.wst11.at.remote.TransactionManagerImple</value>
+        </property>
 
         <!-- the 1.0 client API implementation classes. these are only needed if you are deploying the
             1.0 XTS implementation
@@ -237,12 +239,15 @@
         <property name="userTransaction10">
             <value>com.arjuna.mwlabs.wst.at.remote.UserTransactionImple</value>
         </property>
+        <property name="userBusinessActivity10">
+            <value>com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityImple</value>
+        </property>
+        <!-- the 1.0 participant API implementation classes. these are only needed if you are deploying the
+            1.0 XTS implementation
+        -->
         <property name="transactionManager10">
             <value>com.arjuna.mwlabs.wst.at.remote.TransactionManagerImple</value>
         </property>
-        <property name="userBusinessActivity10">
-            <value>com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityImple</value>
-        </property>
         <property name="businessActivityManager10">
             <value>com.arjuna.mwlabs.wst.ba.remote.BusinessActivityManagerImple</value>
         </property>

Modified: labs/jbosstm/trunk/XTS/sar/META-INF/xts11-jboss-beans.xml
===================================================================
--- labs/jbosstm/trunk/XTS/sar/META-INF/xts11-jboss-beans.xml	2010-08-19 14:40:46 UTC (rev 34794)
+++ labs/jbosstm/trunk/XTS/sar/META-INF/xts11-jboss-beans.xml	2010-08-19 15:34:00 UTC (rev 34795)
@@ -178,12 +178,14 @@
         <property name="userTransaction11">
             <value>com.arjuna.mwlabs.wst11.at.remote.UserTransactionImple</value>
         </property>
+        <property name="userBusinessActivity11">
+            <value>com.arjuna.mwlabs.wst11.ba.remote.UserBusinessActivityImple</value>
+        </property>
+        <!-- the 1.1 participant API implementation classes.
+        -->
         <property name="transactionManager11">
             <value>com.arjuna.mwlabs.wst11.at.remote.TransactionManagerImple</value>
         </property>
-        <property name="userBusinessActivity11">
-            <value>com.arjuna.mwlabs.wst11.ba.remote.UserBusinessActivityImple</value>
-        </property>
         <property name="businessActivityManager11">
             <value>com.arjuna.mwlabs.wst11.ba.remote.BusinessActivityManagerImple</value>
         </property>



More information about the jboss-svn-commits mailing list