[jboss-cvs] JBossAS SVN: r81227 - trunk/jbossas/jts.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 18 10:00:52 EST 2008


Author: jhalliday
Date: 2008-11-18 10:00:52 -0500 (Tue, 18 Nov 2008)
New Revision: 81227

Modified:
   trunk/jbossas/jts/README.txt
   trunk/jbossas/jts/build.xml
Log:
Update JTS install instructions to reflect new lib dir layout. JBAS-6207


Modified: trunk/jbossas/jts/README.txt
===================================================================
--- trunk/jbossas/jts/README.txt	2008-11-18 14:40:16 UTC (rev 81226)
+++ trunk/jbossas/jts/README.txt	2008-11-18 15:00:52 UTC (rev 81227)
@@ -2,12 +2,32 @@
 To remove the default JTA implementation of the transaction service and replace it with the JTS for
 full distributed transaction support, follow the steps below.
 
- - edit build.xml to set the server directory you wish to upgrade.
-   You must select a server that has an ORB configured. By default 'all' is used.
-   You may want to make a backup first.
+- Do not attempt to use a server with both the JTA and JTS .jar files or both the JTA and JTS config files present.
 
- - run 'ant' to remove the JTA implementation and replace it with the JTS implementation.
+- By default the JTA libraries are installed in JBOSS_HOME/common/lib and used by every server configuration.
+  Each server configuration has its own JTA config file, JBOSS_HOME/server/<config>/conf/jbossjta-properties.xml
 
+- To replace the JTA with JTS for every server <config> dir (not recommended):
+  delete JBOSS_HOME/common/lib/jbossjta.jar
+  delete JBOSS_HOME/common/lib/jbossjta-integration.jar
+  copy jbossjts.jar, jbossjts-integration.jar and jbossjts-jacorb.jar to JBOSS_HOME/common/lib
+  delete the JBOSS_HOME/server/<config>/conf/jbossjta-properties files
+  copy jbossjts-properties.xml to each of the JBOSS_HOME/server/<config>/conf directories
+  Add jacorb to any server config that does not already contain it
+  Follow the file editing steps below for each server config
+
+- To replace the JTA with JTS for a single server <config> dir:
+  copy JBOSS_HOME/common/lib/jbossjta.jar and JBOSS_HOME/common/lib/jbossjta-integration.jar to
+  JBOSS_HOME/server/<config>/lib/ for each server you wish to continue using it with
+  delete JBOSS_HOME/common/lib/jbossjta.jar
+  delete JBOSS_HOME/common/lib/jbossjta-integration.jar
+  copy jbossjts.jar, jbossjts-integration.jar and jbossjts-jacorb.jar to
+  JBOSS_HOME/server/<config>/lib for each server you wish to use it with i.e. the one that don't have the JTA.
+  For each server using the JTS, delete JBOSS_HOME/server/<config>/conf/jbossjta-properties.xml
+  and copy jbossjts-properties.xml to JBOSS_HOME/server/<config>/conf/ instead.
+  Follow the file editing steps below for each server config using the JTS.
+
+
  - complete the installation by making the following edits to the server configuration
     (These are difficult to automate with ant and hence are manual steps for now)
 
@@ -15,14 +35,18 @@
    recovery extension property containing the value
    "com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"
 
- - In deploy/transaction-beans.xml, update the TransactionManager class and dependencies as follows:
+ - In deploy/transaction-jboss-beans.xml, update the TransactionManager class and dependencies as follows:
 
     <bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jts.TransactionManagerService">
-            ...
-            <start>
-               <parameter><inject bean="jboss:service=CorbaORB" property="ORB"/></parameter>
-            </start>
-            ...
+        <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager",
+            exposedInterface=com.arjuna.ats.jbossatx.jts.TransactionManagerServiceMBean.class, registerDirectly=true)
+        </annotation>
+
+        ...
+        <start>
+           <parameter><inject bean="jboss:service=CorbaORB" property="ORB"/></parameter>
+        </start>
+        ...
     </bean>
 
  - Edit the conf/jacorb.properies as follows.

Modified: trunk/jbossas/jts/build.xml
===================================================================
--- trunk/jbossas/jts/build.xml	2008-11-18 14:40:16 UTC (rev 81226)
+++ trunk/jbossas/jts/build.xml	2008-11-18 15:00:52 UTC (rev 81227)
@@ -20,34 +20,122 @@
 -->
 
 <!--
-    Ant build script to partially automate the installation of JBossTS JTS into JBossAS.
+    Ant build script to mostly automate the installation of JBossTS JTS into JBossAS.
     @author Jonathan Halliday (jonathan.halliday at redhat.com), September 2008.
+    @author Ivo Studensky (istudens at redhat.com)
 -->
 <project name="jts-install" default="install" basedir=".">
 
+    <property name="common.lib.dir" value="../../../common/lib"/>
+
     <!-- Select which server the JTS will install into. Must have an ORB configured.
         Path relative to our location (docs/examples/jts) -->
-    <property name="server.dir" value="../../../server/all"/>
+    <property name="jts.server.dir" value="../../../server/all"/>
 
+    <!-- Select servers which will continue to use the default JTA -->
+    <property name="jta.server.dir.1" value="../../../server/default"/>
+    <property name="jta.server.dir.2" value="../../../server/web"/>
 
+
     <target name="install">
 
-        <!-- back out the JTA, it does not cohabit well with the JTS -->
-        <delete file="${server.dir}/lib/jbossjta.jar"/>
-        <delete file="${server.dir}/lib/jbossjta-integration.jar"/>
+        <!-- install the JTA to the servers that still need it -->
+        <copy todir="${jta.server.dir.1}/lib/">
+             <fileset dir="${common.lib.dir}" includes="jbossjta*.jar"/>
+        </copy>
+        <copy todir="${jta.server.dir.2}/lib/">
+             <fileset dir="${common.lib.dir}" includes="jbossjta*.jar"/>
+        </copy>
+
+        <!-- back out the common JTA, it does not cohabit well with the JTS -->
+        <delete file="${common.lib.dir}/jbossjta.jar"/>
+        <delete file="${common.lib.dir}/jbossjta-integration.jar"/>
+
         <!-- rename the JTA properties file rather than deleting it,
             as it may have customizations we don't want to lose. -->
-        <move file="${server.dir}/conf/jbossjta-properties.xml" tofile="${server.dir}/conf/jbossjta-properties-old.xml"/>
+        <move file="${jts.server.dir}/conf/jbossjta-properties.xml" tofile="${jts.server.dir}/conf/jbossjta-properties-old.xml"/>
 
         <!-- drop in the JTS components -->
-        <copy file="jbossjts.jar" todir="${server.dir}/lib/"/>
-        <copy file="jbossjts-integration.jar" todir="${server.dir}/lib/"/>
-        <copy file="jbossjts-jacorb.jar" todir="${server.dir}/lib/"/>
-        <copy file="jbossjts-properties.xml" todir="${server.dir}/conf/"/>
+        <copy file="jbossjts.jar" todir="${jts.server.dir}/lib/"/>
+        <copy file="jbossjts-integration.jar" todir="${jts.server.dir}/lib/"/>
+        <copy file="jbossjts-jacorb.jar" todir="${jts.server.dir}/lib/"/>
+        <copy file="jbossjts-properties.xml" todir="${jts.server.dir}/conf/"/>
 
-        <echo message="Transaction service libraries and configuration updated."/>
-        <echo message="Now perform remaining manual install steps per the README.txt file."/>
+        <echo message="Transaction service libraries and configuration installed."/>
 
+        <!-- rewrite the config files for the server that is using JTS -->
+        <antcall target="modify-config-files">
+            <param name="server.dir" value="${jts.server.dir}"/>
+        </antcall>
+
+        <echo message="JTS config files updated for ${jts.server.dir}"/>
+
     </target>
 
+
+
+    <target name="modify-config-files">
+        <!--
+            edit the conf/jbossjts-properties.xml file and remove the
+            recovery extension property containing the value
+                "com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"
+        -->
+        <replaceregexp
+            file="${server.dir}/conf/jbossjts-properties.xml"
+            match="&lt;property\s+name=.com\.arjuna\.ats\.arjuna\.recovery\.recoveryExtension\d+.\s*value=.com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.\s*/&gt;"
+            replace=""  />
+
+
+        <!--
+            In deploy/transaction-beans.xml, update the TransactionManager class and dependencies as follows:
+                <bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jts.TransactionManagerService">
+                ...
+                    <start>
+                       <parameter><inject bean="jboss:service=CorbaORB" property="ORB"/></parameter>
+                    </start>
+                ...
+                </bean>
+        -->
+        <replaceregexp byline="true"
+            file="${server.dir}/deploy/transaction-jboss-beans.xml"
+            match="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
+            replace="com.arjuna.ats.jbossatx.jts.TransactionManagerService"  />
+
+        <replaceregexp
+            file="${server.dir}/deploy/transaction-jboss-beans.xml"
+            match="&lt;/bean&gt;"
+            replace="    &lt;start&gt;&lt;parameter&gt;&lt;inject bean=&quot;jboss:service=CorbaORB&quot; property=&quot;ORB&quot;/&gt;&lt;/parameter&gt;&lt;/start&gt;&#10;&#10;    &lt;/bean&gt;" />
+
+        <!--
+            Edit the conf/jacorb.properies as follows.
+              - change the jacorb.poa.thread_pool_max property to 32
+        -->
+        <replaceregexp
+            file="${server.dir}/conf/jacorb.properties"
+            match="jacorb.poa.thread_pool_max\s*=\s*\d+"
+            replace="jacorb.poa.thread_pool_max=32"  />
+
+	<!--
+	     Edit the deploy/iiop-service.xml and modify the PortableInterceptorInitializers attribute as follows.
+             remove the following lines
+                 <!- - comment out to disable null transaction propagation over IIOP - ->
+                 <initializer>org.jboss.tm.iiop.TxServerClientInterceptorInitializer</initializer>
+                 <!- - comment out to disable transaction demarcation over IIOP - ->
+                 <initializer>org.jboss.tm.iiop.TxServerInterceptorInitializer</initializer>
+             add the following lines
+                 <!- - JBoss TS interceptor. - ->
+                 <initializer>com.arjuna.ats.jts.orbspecific.jacorb.interceptors.interposition.InterpositionORBInitializerImpl</initializer>
+                 <!- - RMI/IIOP tx context interceptor - ->
+                 <initializer>com.arjuna.ats.jbossatx.jts.InboundTransactionCurrentInitializer</initializer>
+	-->
+        <replaceregexp
+            file="${server.dir}/deploy/iiop-service.xml"
+            match="org.jboss.tm.iiop.TxServerClientInterceptorInitializer"
+            replace="com.arjuna.ats.jts.orbspecific.jacorb.interceptors.interposition.InterpositionORBInitializerImpl"  />
+        <replaceregexp
+            file="${server.dir}/deploy/iiop-service.xml"
+            match="org.jboss.tm.iiop.TxServerInterceptorInitializer"
+            replace="com.arjuna.ats.jbossatx.jts.InboundTransactionCurrentInitializer"  />
+
+    </target>
 </project>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list