shuber      2005/11/24 12:25:53 CET

  Modified files:
    core/src/webapp/html/startup howto_cluster.html 
  Removed files:
    .                    TRANSACTIONS-HOWTO.txt 
  Log:
  Complete overhaul of clustering and transactions howto. Full documentation is 
in HTML file now.
  
  Revision  Changes    Path
  1.3       +0 -95     jahia/TRANSACTIONS-HOWTO.txt (dead)
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/TRANSACTIONS-HOWTO.txt?rev=1.2&content-type=text/plain
  1.8       +127 -35   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.7&r2=1.8&f=h
  
  
  
  Index: howto_cluster.html
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/core/src/webapp/html/startup/howto_cluster.html,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- howto_cluster.html        24 Nov 2005 10:23:39 -0000      1.7
  +++ howto_cluster.html        24 Nov 2005 11:25:53 -0000      1.8
  @@ -2,7 +2,7 @@
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
   <html xmlns="http://www.w3.org/1999/xhtml";>
   <head>
  -<title>Jahia Readme</title>
  +<title>Jahia Clustering, Transactions and DB Storage Howto</title>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
   <style type="text/css">
   <!--
  @@ -35,7 +35,7 @@
                                font-size        : 14px;
                                color            : #999999;
                              }
  -DIV.box                    { width            : 190px;
  +DIV.box                    { width            : 150px;
                                color            : #666666;
                                font-family      : Arial, Helvetica, sans-serif;
                                float            : left;
  @@ -86,8 +86,9 @@
                                width            : 768px;
                                clear            : both;
                              }
  -.code                      { font-family      : "Courier New", Courier, mono;
  -                             font-size        : 11px;
  +.code                      {
  +     font-family      : "Courier New", Courier, mono;
  +     font-size        : 11px;
                              }
   span.red             { color : #B42C29; }
   -->
  @@ -107,14 +108,12 @@
               documentation and much more. <br/>
           </div>
       </div>
  -    <div class="maincontent">
  -        <h1>How to setup clustering and database content storage of large 
data</h1>
  -        <p>
  +  <div class="maincontent">
  +        <h1>How to setup clustering, database content storage of large data 
and transactions </h1>
  +<p>
                                                If you want to activate the 
clustering configuration, you should
  -                                             modify a few configuration 
files.<br/>
  -        </p>
  -                       <p>
  -       <h2>I - To activate in base content storage</h2>
  +                                             modify a few configuration 
files.      </p>
  +        <h2>I - To activate in base content storage</h2>
                                          To setup in base content storage, you 
just have to select "in base storage" during the
                                          configuration wizard, in the database 
advanced configuration screen.<br/><br/>
                                                <b>Please note that currently, 
in base content storage does not work with PostgreSQL. This will be fixed
  @@ -132,13 +131,10 @@
                                          [mysqld]<br/>
                                          max_allowed_packet=16M
                                          </p>
  -                                     will limit the maximum size for each 
file stored in the database to 16 Megabytes.
  -                                     <br/><br/>
  -        </p>
  -        <p>
  -       <h2>II - To setup and activate the clustering feature</h2>
  +                                 <p>will limit the maximum size for each 
file stored in the database to 16 Megabytes.                </p>
  +                                       <h2>II - To setup and activate the 
clustering feature</h2>
                                         This howto describe the procedure when 
2 Jahia nodes are setup in cluster; if more nodes are used, follow the same
  -                                      procedure for all nodes.<br/>
  +<br/>
                                         <ol>
                                                 <li>Install the first instance 
as for a stand-alone configuration.<br/> 
                                                           During the 
configuration wizard, select "in base content storing" if you prefer to store 
all 
  @@ -176,21 +172,20 @@
                                           <li>Modify the 
<i>jahia/WEB-INF/classes/treecache.xml</i> file and replace the following line 
:<br/>
                                             <p class="code">&lt;attribute 
name="CacheMode"&gt;LOCAL&lt;/attribute&gt;</p>
                                             <p>with the line </p>
  -                                          <p class="code">&lt;attribute 
name="CacheMode"&gt;REPL_ASYNC&lt;/attribute&gt;<br/>
  -                                        </p>
  +                                          <p class="code">&lt;attribute 
name="CacheMode"&gt;REPL_ASYNC&lt;/attribute&gt;</p>
                                           </li><li>Modify the 
<i>jahia/WEB-INF/etc/spring/applicationcontext-services.xml</i>
                                                 and set the value of the 
parameter &lt;property name="activated"&gt; to <b>true</b> in the 
                                                 <i>ClusterService</i> bean 
<br/>(<i>&lt;bean id="ClusterService" 
parent="txProxyTemplate"&gt;</i>).<br/><br/>
                                                         A <b>different</b> 
server ID is also required for each node of the cluster. This should also be 
modified in the 
                                                         
<i>applicationcontext-services.xml</i> file :
  -<p class="code">
  - &lt;bean id="ClusterNodeSettings" 
class="org.springframework.beans.factory.config.PropertiesFactoryBean"&gt;
  +<pre class="code">&lt;bean id="ClusterNodeSettings" 
  +      
class="org.springframework.beans.factory.config.PropertiesFactoryBean"&gt;
     &lt;property name="properties"&gt;
  -   &lt;props&gt;
  -    &lt;prop key="serverId"&gt;<span 
class="red">jahiaServer1</span>&lt;/prop&gt;
  -   &lt;/props&gt;
  +    &lt;props&gt;
  +      &lt;prop key="serverId"&gt;<span 
class="red">jahiaServer1</span>&lt;/prop&gt;
  +    &lt;/props&gt;
     &lt;/property&gt;
  - &lt;/bean&gt;</p>
  +&lt;/bean&gt;</pre>
                                           </li>
                                           <li>Modify the 
<i>jahia/WEB-INF/etc/spring/applicationcontext-dao.xml</i> and set the value of 
the parameter &lt;property name=&quot;clusterActivated&quot;&gt; to <b>true</b> 
in the <i>idGeneratorDAO</i> bean <br/>
                                       (<i>&lt;bean 
id=&quot;idGeneratorDAO&quot; 
class=&quot;org.jahia.hibernate.dao.IDGeneratorDAO&quot; 
init-method=&quot;start&quot; destroy-method=&quot;stop&quot;&gt;</i>).<br />
  @@ -204,11 +199,11 @@
                                                 To change the multicast 
address, you should <br/><br/>
                                                i) modifiy the following line 
in the 
                                                
<i>jahia/WEB-INF/classes/treecache.xml</i> file :<br/>
  -                                             <p class="code"> &lt;UDP 
mcast_addr=&quot;231.12.21.140&quot; mcast_port=&quot;45010&quot;<br />
  -ip_ttl=&quot;64&quot; ip_mcast=&quot;true&quot;<br />
  -mcast_send_buf_size=&quot;150000&quot; 
mcast_recv_buf_size=&quot;80000&quot;<br />
  -ucast_send_buf_size=&quot;150000&quot; 
ucast_recv_buf_size=&quot;80000&quot;<br />
  -loopback=&quot;false&quot;/&gt;</p>
  +                                             <pre class="code">&lt;UDP 
mcast_addr=&quot;231.12.21.140&quot; mcast_port=&quot;45010&quot;
  +     ip_ttl=&quot;64&quot; ip_mcast=&quot;true&quot;
  +     mcast_send_buf_size=&quot;150000&quot; 
mcast_recv_buf_size=&quot;80000&quot;
  +     ucast_send_buf_size=&quot;150000&quot; 
ucast_recv_buf_size=&quot;80000&quot;
  +     loopback=&quot;false&quot;/&gt;</pre>
                                                        In the above tag, 
modify the <span class="code">231.12.21.140</span> with any unused IP address 
within the reserved multicast IP ranges as documented here : 
http://www.iana.org/assignments/multicast-addresses. Make sure also that if you 
have 
                                                        bridge, switch or hub 
hardware between the Jahia installations that it does forward UDP multicast 
                                                        packets.<br/>
  @@ -224,17 +219,114 @@
                                         the output console when starting each 
jahia node :<br/>
                                         <br/>
                                         <p class="code">GMS: address is 
ip_address:port</p>
  -                                      where <i>ip_address</i> is the local 
IP address of the node, and <i>port</i> the port used to communicate 
  +                                      <p>where <i>ip_address</i> is the 
local IP address of the node, and <i>port</i> the port used to communicate 
                                                with other Jahia nodes.<br/>
                                                <br/>
                                                <span class="red">Make sure 
that if you have a firewall installed, it does not have filering enabled for 
the ports used to send 
                                                        and receive the 
packets. The following error in the console may indicate such problem :<br/>
                                                        <br/>
                                                        
[org.jgroups.protocols.UDP] ERROR - exception=java.net.BindException: Cannot 
assign requested address: Datagram send failed, msg=[ds
  -                                                     1.12.21.133:45000, src: 
192.168.2.130:1664 (2 headers), size = 0 bytes], mcast_addr=231.12.21.133:45000
  -       </span>
  -        </p><br/><br/><br/><br/>
  -    </div>
  +                                                     1.12.21.133:45000, src: 
192.168.2.130:1664 (2 headers), size = 0 bytes], mcast_addr=231.12.21.133:45000 
                    </span>
  +    </p>
  +    </p>
  +                                      <h2>III - To setup and activate 
transactions</h2>
  +                                      <p>Introduction                        
                 </p>
  +    <p>Jahia can now be configured to use transactions, and will soon 
require this in order to guarantee data integrity. Clustering setups also 
<strong>require</strong> transactions to be setup properly. This howto explains 
how to setup transactions with Tomcat, but it is also possible to use the 
default transaction manager of a J2EE application server, such as Apache 
Geronimo or JBoss. This guide only explains the steps to configure transactions 
with Tomcat.</p>
  +                     <p>Requirements :    </p>
  +                     <ul>
  +                       <li>JOTM 2.0.10 available at : <a 
href="http://jotm.objectweb.org/";>http://jotm.objectweb.org/</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>Remove jta*.jar and geronimo-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>
  +                         <li>commons-cli-1.0.jar</li>
  +                         <li>commons-logging.jar</li>
  +                         <li>connector-1_5.jar</li>
  +                         <li>howl.jar</li>
  +                         <li>jotm.jar</li>
  +                         <li>jotm_jrmp_stubs.jar</li>
  +                         <li>jta-spec1_0_1.jar</li>
  +                         <li>jts1_0.jar</li>
  +                         <li>objectweb-datasource.jar</li>
  +                         <li>ow_carol.jar</li>
  +                         <li>xapool.jar</li>
  +                                        </ul></li>
  +                       <li> Copy your database driver into the 
tomcat/common/lib directory<br />
  +                       </li>
  +                       <li> Install Jahia<br />
  +                       </li>
  +                       <li> In tomcat/conf/Catalina/localhost/jahia.xml, 
uncomment the following lines :<br />
  +                         <br />
  +                         <pre class="code">&lt;Resource 
name=&quot;UserTransaction&quot; auth=&quot;Container&quot; 
  +          type=&quot;javax.transaction.UserTransaction&quot;
  +          factory=&quot;org.objectweb.jotm.UserTransactionFactory&quot;
  +          jotm.timeout=&quot;60&quot;/&gt;</pre>
  +                         Also change this line :<br />
  +                         <br /> 
  +                         <pre class="code">&lt;Resource 
name=&quot;jdbc/jetspeed&quot; auth=&quot;Container&quot;
  +          factory=&quot;org.apache.commons.dbcp.BasicDataSourceFactory&quot;
  +          type=&quot;javax.sql.DataSource&quot; username=&quot;jahia&quot; 
password=&quot;jahia&quot;
  +          driverClassName=&quot;org.postgresql.Driver&quot; 
url=&quot;jdbc:postgresql:jahia&quot;
  +          maxActive=&quot;100&quot; maxIdle=&quot;30&quot; 
maxWait=&quot;10000&quot;/&gt;</pre> 
  +                         to : <br />
  +                           <br />
  +                           <pre class="code">&lt;Resource 
name=&quot;jdbc/jetspeed&quot; auth=&quot;Container&quot;
  +          factory=&quot;org.objectweb.jndi.DataSourceFactory&quot;
  +          type=&quot;javax.sql.DataSource&quot; username=&quot;jahia&quot; 
password=&quot;jahia&quot;
  +          driverClassName=&quot;org.postgresql.Driver&quot; 
url=&quot;jdbc:postgresql:jahia&quot;
  +          maxActive=&quot;100&quot; maxIdle=&quot;30&quot; 
maxWait=&quot;10000&quot;/&gt;</pre>
  +                       </li>
  +                       <li>In 
tomcat/webapps/jahia/WEB-INF/classes/treecache.xml, uncomment the following 
line : <br />
  +                           <br />
  +                         <pre class="code">&lt;attribute 
name=&quot;TransactionManagerLookupClass&quot;&gt;
  +  org.jahia.services.cache.jboss.TomcatTransactionManagerLookup
  +&lt;/attribute&gt;</pre>
  +                       </li>
  +                       <li> In 
tomcat/webapps/jahia/WEB-INF/etc/spring/applicationcontext-hibernate.xml, 
uncomment the following line :<br />
  +                         <br /> 
  +                         <pre class="code">&lt;prop 
key=&quot;hibernate.transaction.factory_class&quot;&gt;
  +  org.hibernate.transaction.JTATransactionFactory
  +&lt;/prop&gt;</pre>
  +                         </li>
  +                       <li> In 
tomcat/webapps/jahia/WEB-INF/etc/spring/applicationcontext-hibernate.xml, 
uncomment the following lines :<br />
  +                         <br /> 
  +                         <pre class="code">&lt;bean 
id=&quot;transactionManager&quot; 
  +      
class=&quot;org.springframework.transaction.jta.JtaTransactionManager&quot;&gt;
  +  &lt;property name=&quot;userTransactionName&quot;&gt;
  +    java:comp/env/UserTransaction
  +  &lt;/property&gt;
  +&lt;/bean&gt;</pre>
  +                         and comment the following lines : <br />
  +                         <br />
  +                         <pre class="code">&lt;bean 
id=&quot;transactionManager&quot; 
  +      
class=&quot;org.springframework.orm.hibernate3.HibernateTransactionManager&quot;&gt;
  +  &lt;property name=&quot;sessionFactory&quot;&gt;
  +    &lt;ref local=&quot;sessionFactory&quot;/&gt;
  +  &lt;/property&gt;
  +  &lt;property name=&quot;nestedTransactionAllowed&quot;&gt;
  +    &lt;value&gt;@NESTED_TRANSACTION_ALLOWED@&lt;/value&gt;
  +  &lt;/property&gt;
  +&lt;/bean&gt;</pre>
  +                       </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>
  +                     </ol>
  +  </div>
       <div class="footer">
           Copyright 2005, <a href="http://www.jahia.org";>Jahia Ltd</a> - All 
rights reserved
       </div>
  

Reply via email to