bpapez 2005/12/06 13:13:57 CET
Modified files:
core/src/webapp/html/startup howto_cluster.html
Log:
update instructions for configuring transaction support
Revision Changes Path
1.18 +96 -43 jahia/core/src/webapp/html/startup/howto_cluster.html
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/html/startup/howto_cluster.html.diff?r1=1.17&r2=1.18&f=h
Index: howto_cluster.html
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/webapp/html/startup/howto_cluster.html,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- howto_cluster.html 5 Dec 2005 16:21:31 -0000 1.17
+++ howto_cluster.html 6 Dec 2005 12:13:57 -0000 1.18
@@ -206,7 +206,7 @@
<i>jahia\WEB-INF\etc\spring\applicationcontext-basejahiaconfig.xml</i> file
:<br/><br/>
<i>
-
<prop
key="org.jahia.services.search.searchIndexRootDir">J:\SHARED_DIRECTORY\search_indexes</prop><br>
+
<prop
key="org.jahia.services.search.searchIndexRootDir">J:\SHARED_DIRECTORY\search_indexes</prop><br/>
<prop key="org.jahia.services.search.localIndexing">0</prop><br/>
<!--
1: index, 0: do not index ,just read ( I.E when sharing a same index directory
in a clustered environment )--><br/>
</i>
@@ -320,13 +320,29 @@
<p>Requirements : </p>
<ul>
<li>JOTM 2.0.10 available at : <a
href="http://jotm.objectweb.org/">http://jotm.objectweb.org/</a></li>
+ <li>XA-pool 1.5.0 available at : <a
href="http://xapool.experlog.com/">http://xapool.experlog.com/</a></li>
<li>Tomcat 5.5 available at : <a
href="http://jakarta.apache.org/tomcat">http://jakarta.apache.org/tomcat</a></li>
<li> Jahia 5.0 available at : <a
href="http://www.jahia.net">http://www.jahia.net</a></li>
</ul>
<p>On Tomcat 5.5 :</p>
<ol>
- <li>Install Jahia or make sure you already have a
configured Jahia installation </li>
- <li>Remove jta*.jar and geronimo-spec-jta*.jar from
tomcat/webapps/jahia/WEB-INF/lib<br />
+ <li>Install Jahia or make sure you already have a
configured Jahia installation. </br></br>
+ <span class="red">If you are using MySQL</span>, you
have to change the following settings in
tomcat/webapps/jahia/WEB-INF/var/db/mysql.script <span
class="red">before</span> Jahia installation : <br /><br />
+ Uncomment the following lines:
+<pre class="code">jahia.database.schemascriptdir = sql/schema/mysql-tx
+jahia.database.transactions = true
+jahia.database.hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
+jahia.transaction_isolation_level = ISOLATION_DEFAULT
+jahia.nested_transaction_allowed = false</pre><br />
+Comment the following lines:
+<pre class="code">jahia.database.schemascriptdir = sql/schema/mysql
+jahia.database.transactions = false
+jahia.database.hibernate.dialect = org.hibernate.dialect.MySQLDialect
+jahia.transaction_isolation_level = ISOLATION_READ_UNCOMMITTED
+jahia.nested_transaction_allowed = true</pre>
+<span class="red">If you are using MySQL 5.x</span>, you should have at
least <strong>5.0.16</strong> installed, because a bug (<a
href="http://bugs.mysql.com/bug.php?id=13900">http://bugs.mysql.com/bug.php?id=13900</a>)
corrupts our jahia_fields_data table.
+ </li>
+ <li>After installation remove jta*.jar and
geronimo-spec-jta*.jar from tomcat/webapps/jahia/WEB-INF/lib<br />
</li>
<li> From JOTM lib directory, copy the following JARs
into tomcat/common/lib<br />
<ul>
@@ -339,15 +355,37 @@
<li>jts1_0.jar</li>
<li>objectweb-datasource.jar</li>
<li>ow_carol.jar</li>
- <li>xapool.jar</li>
- </ul></li>
+ </ul><br />
+ Get the xapool.jar version 1.5.0 and
copy it into tomcat/common/lib.<br />
+ <br />
+ You also have to copy the log4j*.jar
from tomcat/webapps/jahia/WEB-INF/lib to tomcat/common/lib
+ </li>
+ <li> In tomcat/common/classes, add the following file
:<br />
+ <br />
+ carol.properties, with the following content
(without the BEGIN and END lines) : <br />
+ <br />
+ <pre class="code">-- BEGIN --
+carol.protocols=jrmp
+carol.start.jndi=false
+carol.start.ns=false
+carol.start.rmi=false
+carol.jndi.java.naming.factory.url.pkgs=org.apache.naming
+-- END --</pre>
+ </li>
+ <li> In tomcat/conf/server.xml add
the following lines in the GlobalNamingResources section :
+ <br />
+ <pre class="code"><Resource
name="UserTransaction"
+ auth="Container"
+ type="javax.transaction.UserTransaction"
+ factory="org.objectweb.jotm.UserTransactionFactory"
+ jotm.timeout="120"/></pre>
+ </li>
<li> In tomcat/conf/Catalina/localhost/jahia.xml,
uncomment the following lines :<br />
<br />
- <pre class="code"><Resource
name="UserTransaction" auth="Container"
- type="javax.transaction.UserTransaction"
- factory="org.objectweb.jotm.UserTransactionFactory"
- jotm.timeout="60"/></pre>
- Also change the red line in this part (keep the
other lines unchanged) :<br />
+ <pre class="code"><ResourceLink
name="UserTransaction"
+ global="UserTransaction"
+ type="javax.transaction.UserTransaction"/></pre>
+ Also change the red line in the
<strong>jdbc/jetspeed</strong> resource configuration (keep the other lines and
resource configurations unchanged) :<br />
<br />
<pre class="code"><Resource
name="jdbc/jetspeed" auth="Container"
<span
class="red">factory="org.apache.commons.dbcp.BasicDataSourceFactory"</span>
@@ -369,14 +407,30 @@
<li>In
tomcat/webapps/jahia/WEB-INF/classes/treecache.xml, uncomment the following
line : <br />
<br />
<pre class="code"><attribute
name="TransactionManagerLookupClass">
- org.jahia.services.cache.jboss.TomcatTransactionManagerLookup
+ org.jboss.cache.GenericTransactionManagerLookup
</attribute>
</pre>
</li>
- <li> In
tomcat/webapps/jahia/WEB-INF/etc/spring/applicationcontext-hibernate.xml,
uncomment the following line :<br />
+ <li> In
tomcat/webapps/jahia/WEB-INF/etc/spring/applicationcontext-services.xml,
uncomment the following lines :<br />
+ <br />
+ <pre class="code"><bean
id="org.jahia.services.cache.CacheProvider"
+
class="org.jahia.services.cache.treecache.TreeCacheProvider"/></pre>
+ and comment the following lines : <br />
+ <br />
+ <pre class="code"><bean
id="org.jahia.services.cache.CacheProvider"
+
class="org.jahia.services.cache.clusterservice.ClusterServiceCacheProvider">
+ <property name="clusterService">
+ <ref bean="ClusterService" />
+ </property>
+</bean></pre>
+ </li>
+ <li> In
tomcat/webapps/jahia/WEB-INF/etc/spring/applicationcontext-hibernate.xml,
uncomment the following lines :<br />
<br />
<pre class="code"><prop
key="hibernate.transaction.factory_class">
org.hibernate.transaction.JTATransactionFactory
+</prop>
+<prop key="hibernate.transaction.manager_lookup_class">
+ org.hibernate.transaction.JOTMTransactionManagerLookup
</prop></pre>
</li>
<li> In
tomcat/webapps/jahia/WEB-INF/etc/spring/applicationcontext-hibernate.xml,
uncomment the following lines :<br />
@@ -384,8 +438,11 @@
<pre class="code"><bean
id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="userTransactionName">
- java:comp/env/UserTransaction
+ java:comp/UserTransaction
</property>
+ <property name="nestedTransactionAllowed">
+ <value>false</value>
+ </property>
</bean></pre>
and comment the following lines : <br />
<br />
@@ -399,38 +456,34 @@
</property>
</bean></pre>
</li>
- <li><span class="red">If you are using MySQL</span>,
in tomcat/webapps/jahia/WEB-INF/etc/spring/applicationcontext-manager.xml,
modify the lines in the "txProxyTemplate" to look like this : <br />
- <br />
-<pre class="code"><property name="transactionAttributes">
- <props>
- <prop
key="*">PROPAGATION_SUPPORTS,+ObjectRetrievalFailureException</prop>
- <prop
key="save*">PROPAGATION_REQUIRED,+ObjectRetrievalFailureException</prop>
- <prop
key="create*">PROPAGATION_REQUIRED,+ObjectRetrievalFailureException</prop>
- <prop
key="backup*">PROPAGATION_REQUIRED,+ObjectRetrievalFailureException</prop>
- <prop
key="delete*">PROPAGATION_REQUIRED,+ObjectRetrievalFailureException</prop>
- <prop
key="remove*">PROPAGATION_REQUIRED,+ObjectRetrievalFailureException</prop>
- <prop
key="update*">PROPAGATION_REQUIRED,+ObjectRetrievalFailureException</prop>
- <prop
key="acquire*">PROPAGATION_REQUIRED,+ObjectRetrievalFailureException</prop>
- <prop
key="release*">PROPAGATION_REQUIRED,+ObjectRetrievalFailureException</prop>
- <prop
key="purge*">PROPAGATION_REQUIRED,+ObjectRetrievalFailureException</prop>
- <prop
key="activate*">PROPAGATION_REQUIRED,+ObjectRetrievalFailureException</prop>
- </props>
-</property>
-</pre>
- This means that you should remove the
",ISOLATION_READ_UNCOMITTED" part on all the lines. <br />
- </li>
- <li> In tomcat/common/classes, add the following file
:<br />
+ <li> In
tomcat/webapps/jahia/WEB-INF/etc/jetspeed/conf/assembly/transaction.xml,
uncomment the following lines :<br />
+ <br />
+ <pre class="code"><bean
id="transactionManager"
+
class="org.springframework.transaction.jta.JtaTransactionManager">
+ <property name="userTransactionName">
+ java:comp/UserTransaction
+ </property>
+</bean></pre>
+ and comment the following lines : <br />
<br />
- carol.properties, with the following content
(without the BEGIN and END lines) : <br />
+ <pre class="code"><bean
id="transactionManager"
+
class="org.springframework.orm.ojb.PersistenceBrokerTransactionManager"/></pre>
+ </li>
+ <li>Copy all files from
tomcat/webapps/jahia/WEB-INF/etc/jetspeed/conf/ojb to
tomcat/webapps/jahia/WEB-INF/classes<br />
+ </li>
+ <li> In
tomcat/webapps/jahia/WEB-INF/etc/config/quartz.properties, comment the
following line :<br />
+ <br />
+ <pre class="code">org.quartz.jobStore.class =
org.quartz.impl.jdbcjobstore.JobStoreTX
+</pre>
+ and uncomment the following lines : <br />
<br />
- <pre class="code">-- BEGIN --
-carol.protocols=jrmp
-carol.start.jndi=false
-carol.start.ns=false
-carol.start.rmi=false
-carol.jndi.java.naming.factory.url.pkgs=org.apache.naming
--- END --</pre>
- </li>
+ <pre
class="code">org.quartz.scheduler.wrapJobExecutionInUserTransaction = true<br/>
+org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
+org.quartz.jobStore.nonManagedTXDataSource = jahiaNonTxDS
+org.quartz.jobStore.dontSetAutoCommitFalse = true <br/>
+org.quartz.dataSource.jahiaDS.jndiURL = java:comp/env/jdbc/jetspeed
+</pre>
+ </li>
</ol>
</div>
<div class="footer">