geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v3.0 > JMS clustering in Geronimo
Date Fri, 15 Jul 2011 03:53:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/4/_/styles/combined.css?spaceKey=GMOxDOC30&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/JMS+clustering+in+Geronimo">JMS
clustering in Geronimo</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~chirunhua@gmail.com">Runhua
Chi</a>
    </h4>
        <br/>
                         <h4>Changes (34)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >{scrollbar} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >{excerpt}JMS clustering in Geronimo
is handled by ActiveMQ component <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">directly.{excerpt}
By updating the {{activemq.xml}} file under the {{/var/activemq/conf}} directory,</span>
<span class="diff-added-words"style="background-color: #dfd;">using blueprint services.{excerpt}</span>
you can configure brokers to be clustered, and a JMS request can failover to another broker
if the JMS broker goes down using [Master Slave|http://activemq.apache.org/masterslave.html|Master
Slave] functionality. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h1.
Prerequisite <br> <br>Make sure the system module {{org/apache/geronimo/activemq-ra/3.0/car}}
is loaded during server startup. And then update {{config-substitutions.properties}} file
under the {{/var/config}} directory to specify IP address or host name for each ActiveMQ node
when the server is stopped. <br>{code:xml|title=config-substitutions.properties} <br>ActiveMQHostname=hostname/IP
<br>{code} <br> <br> <br>h1. JMS clustering scenarios <br> <br></td></tr>
            <tr><td class="diff-unchanged" >There are different kinds of Master/Slave
configurations available according to ActiveMQ documentation: <br>{toc:maxlevel=1} <br>
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">In
Geronimo server, all those configurations are handled using blueprint services. You need to
update the content of {{activemq.xml}} within {{activemq-broker-blueprint-3.0.car}} under
{{/repository/org/apache/geronimo/configs/activemq-broker-blueprint/3.0}} directory in accordance
with the scenario you choose. The easier way would be to unzip {{activemq-broker-blueprint-3.0.car}}
and repack them after modification. <br> <br> <br></td></tr>
            <tr><td class="diff-unchanged" >See the following configuration for
each scenario in Geronimo <br> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">1</span><span
class="diff-added-chars"style="background-color: #dfd;">2</span>.</span> Pure
Master/Slave <br></td></tr>
            <tr><td class="diff-unchanged" >With this scenario, you must specify
the master and slave node explicitly and manually restart a failed master. <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">2</span><span
class="diff-added-chars"style="background-color: #dfd;">3</span>.</span> Master
node <br></td></tr>
            <tr><td class="diff-unchanged" >On the master node, you just need
to specify that the current node is a master by using the _brokerName_ attribute as follows.
<br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{code:title=activemq.xml}
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{code:xml|title=activemq.xml}
<br></td></tr>
            <tr><td class="diff-unchanged" >... <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">&lt;broker
xmlns=&quot;http://activemq.apache.org/schema/core&quot;  <br>        brokerName=&quot;master&quot;
 <br>        useJmx=&quot;false&quot;  <br>        deleteAllMessagesOnStartup=&quot;true&quot;
 <br>        tmpDataDirectory=&quot;${activemq.data}/tmp_storage&quot;  <br>
       useShutdownHook=&quot;false&quot; start=&quot;false&quot;&gt; <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
      &lt;cm:property name=&quot;serverHostname&quot; value=&quot;masterIP&quot;/&gt;
<br></td></tr>
            <tr><td class="diff-unchanged" >... <br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">2</span><span
class="diff-added-chars"style="background-color: #dfd;">3</span>.</span> Slave
node <br></td></tr>
            <tr><td class="diff-unchanged" >Because each master has only one slave
in the Pure Master/Slave scenario, the slave node must know the URI of the master node and
also be tagged as a slave node by using the _brokerName_ attribute. <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{code:title=activemq.xml}
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{code:xml|title=activemq.xml}
<br></td></tr>
            <tr><td class="diff-unchanged" >... <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">
&lt;broker xmlns=&quot;http://activemq.apache.org/schema/core&quot;  <br>
        brokerName=&quot;slave&quot; deleteAllMessagesOnStartup=&quot;true&quot;
<br>         useJmx=&quot;false&quot;  <br>         masterConnectorURI=&quot;tcp://masterHostname:${${ActiveMQPort}}&quot;
<br>         tmpDataDirectory=&quot;${activemq.data}/tmp_storage&quot;  <br>
        useShutdownHook=&quot;false&quot; start=&quot;false&quot;&gt;
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
      &lt;cm:property name=&quot;serverHostname&quot; value=&quot;slaveIP&quot;/&gt;
<br></td></tr>
            <tr><td class="diff-unchanged" >... <br>{code} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
<br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">2</span><span
class="diff-added-chars"style="background-color: #dfd;">3</span>.</span> Client
connection <br></td></tr>
            <tr><td class="diff-unchanged" >JMS clients use the failover:// protocol
to locate brokers in a cluster. See the following example: <br>{panel} <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">failover://(tcp://masterhost:61616,tcp://slavehost:61616)?randomize=false</span>
<span class="diff-added-words"style="background-color: #dfd;">failover://(tcp://masterIP:61616,tcp://slaveIP:61616)?randomize=false</span>
<br></td></tr>
            <tr><td class="diff-unchanged" >{panel} <br> <br> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">1</span><span
class="diff-added-chars"style="background-color: #dfd;">2</span>.</span> Shared
File system <br></td></tr>
            <tr><td class="diff-unchanged" >In this scenario, you must use a shared
file system to provide high availability of brokers and automatic discovery of master/slave
nodes. The shared folder must allow different slaves to have _write_ permission. <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">2</span><span
class="diff-added-chars"style="background-color: #dfd;">3</span>.</span> Each
node <br></td></tr>
            <tr><td class="diff-unchanged" >On each node, configure a shared directory
as the place where brokers are using the {{persistenceAdapter}} element as follows: <br>{code:title=activemq.xml}
<br>... <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">
  &lt;persistenceAdapter&gt; <br>      &lt;amqPersistenceAdapter directory=&quot;/sharedFileSystem/sharedBrokerData&quot;/&gt;
<br>    &lt;/persistenceAdapter&gt; <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
      &lt;cm:property name=&quot;serverHostname&quot; value=&quot;broker1&quot;/&gt;
<br></td></tr>
            <tr><td class="diff-unchanged" >... <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
      &lt;amq:persistenceAdapter&gt; <br>            &lt;amq:amqPersistenceAdapter
directory=&quot;/sharedFileSystem/sharedBrokerData&quot;/&gt; <br>     
 &lt;/amq:persistenceAdapter&gt; <br>... <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>Note that: <br>*
For the shared file system on a Linux node, you must mount the shared directory first. <br>*
For the shared file system on a Windows node, you can use the path such as {{//ipAddress/sharedFolder}}
in the configuration. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">*
On each node, _broker1_ should be replaced with the exact IP address of current node. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">2</span><span
class="diff-added-chars"style="background-color: #dfd;">3</span>.</span> Client
connection <br></td></tr>
            <tr><td class="diff-unchanged" >JMS clients use the failover:// protocol
to locate brokers in a cluster. See the following example: <br>{panel} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{panel} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">1</span><span
class="diff-added-chars"style="background-color: #dfd;">2</span>.</span> JDBC
Master Slave <br></td></tr>
            <tr><td class="diff-unchanged" >In this scenario, you must use a shared
database as the persistence enginee and automatic recovery. <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">2</span><span
class="diff-added-chars"style="background-color: #dfd;">3</span>.</span> Each
node <br></td></tr>
            <tr><td class="diff-changed-lines" >On each node, configure a shared
database pool by using the {{jdbcPersistenceAdapter}} element as follows. We use <span
class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">the
embeded Derby</span> <span class="diff-added-words"style="background-color: #dfd;">a
remote Oracle</span> database server as an example: <br></td></tr>
            <tr><td class="diff-unchanged" >{code:title=activemq.xml} <br>...
<br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">
   &lt;persistenceAdapter&gt; <br>      &lt;amqPersistenceAdapter dataSource=&quot;Shared-DS&quot;/&gt;
<br>    &lt;/persistenceAdapter&gt; <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
    &lt;cm:property name=&quot;serverHostname&quot; value=&quot;broker1&quot;/&gt;
<br></td></tr>
            <tr><td class="diff-unchanged" >... <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">
   &lt;bean id=&quot;Shared-ds&quot; class=&quot;org.apache.derby.jdbc.EmbeddedDataSource&quot;&gt;
<br>      &lt;property name=&quot;databaseName&quot; value=&quot;Shared_db&quot;/&gt;
<br>      &lt;property name=&quot;createDatabase&quot; value=&quot;create&quot;/&gt;
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
    &lt;amq:persistenceAdapter&gt; <br>         &lt;amq:jdbcPersistenceAdapter
dataSource=&quot;#oracle-ds&quot;/&gt; <br>     &lt;/amq:persistenceAdapter&gt;
<br>... <br>     &lt;bean id=&quot;oracle-ds&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot;
destroy-method=&quot;close&quot;&gt; <br>      &lt;property name=&quot;driverClassName&quot;
value=&quot;oracle.jdbc.driver.OracleDriver&quot;/&gt; <br>      &lt;property
name=&quot;url&quot; value=&quot;jdbc:oracle:thin:@dbServer:1521:AMQDB&quot;/&gt;
<br>      &lt;property name=&quot;username&quot; value=&quot;scott&quot;/&gt;
<br>      &lt;property name=&quot;password&quot; value=&quot;tiger&quot;/&gt;
<br>      &lt;property name=&quot;maxActive&quot; value=&quot;200&quot;/&gt;
<br>      &lt;property name=&quot;poolPreparedStatements&quot; value=&quot;true&quot;/&gt;
<br></td></tr>
            <tr><td class="diff-unchanged" >    &lt;/bean&gt; <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">...
<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Note
that: <br>* For the database server, _dbServer_ should be replaced with actual IP address
of the database server. <br>* On each node, _broker1_ should be replaced with the exact
IP address of current node. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">2</span><span
class="diff-added-chars"style="background-color: #dfd;">3</span>.</span> Client
connection <br></td></tr>
            <tr><td class="diff-unchanged" >JMS clients use the failover:// protocol
to locate brokers in a cluster. See the following example:  <br>{panel} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/GMOxDOC30/Farming+using+Deployment"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/GMOxDOC30/Farming+using+Deployment">Farming
using Deployment</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC30/Clustering+and+farming"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC30/Clustering+and+farming">Clustering and farming</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/GMOxDOC30/Plugin+based+Farming">Plugin
based Farming</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC30/Plugin+based+Farming"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<p>JMS clustering in Geronimo is handled by ActiveMQ component using blueprint services.
you can configure brokers to be clustered, and a JMS request can failover to another broker
if the JMS broker goes down using <a href="http://activemq.apache.org/masterslave.html"
title="Master Slave" class="external-link" rel="nofollow">Master Slave</a> functionality.
</p>

<h1><a name="JMSclusteringinGeronimo-Prerequisite"></a>Prerequisite</h1>

<p>Make sure the system module <tt>org/apache/geronimo/activemq-ra/3.0/car</tt>
is loaded during server startup. And then update <tt>config-substitutions.properties</tt>
file under the <tt>/var/config</tt> directory to specify IP address or host name
for each ActiveMQ node when the server is stopped.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>config-substitutions.properties</b></div><div
class="codeContent panelContent">
<pre class="code-xml">
ActiveMQHostname=hostname/IP
</pre>
</div></div>


<h1><a name="JMSclusteringinGeronimo-JMSclusteringscenarios"></a>JMS clustering
scenarios</h1>

<p>There are different kinds of Master/Slave configurations available according to ActiveMQ
documentation:</p>
<div>
<ul>
    <li><a href='#JMSclusteringinGeronimo-Prerequisite'>Prerequisite</a></li>
    <li><a href='#JMSclusteringinGeronimo-JMSclusteringscenarios'>JMS clustering
scenarios</a></li>
</ul></div>

<p>In Geronimo server, all those configurations are handled using blueprint services.
You need to update the content of <tt>activemq.xml</tt> within <tt>activemq-broker-blueprint-3.0.car</tt>
under <tt>/repository/org/apache/geronimo/configs/activemq-broker-blueprint/3.0</tt>
directory in accordance with the scenario you choose. The easier way would be to unzip <tt>activemq-broker-blueprint-3.0.car</tt>
and repack them after modification.</p>


<p>See the following configuration for each scenario in Geronimo</p>

<h2><a name="JMSclusteringinGeronimo-PureMaster%2FSlave"></a>Pure Master/Slave</h2>
<p>With this scenario, you must specify the master and slave node explicitly and manually
restart a failed master.</p>
<h3><a name="JMSclusteringinGeronimo-Masternode"></a>Master node</h3>
<p>On the master node, you just need to specify that the current node is a master by
using the <em>brokerName</em> attribute as follows.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>activemq.xml</b></div><div class="codeContent
panelContent">
<pre class="code-xml">
...
       <span class="code-tag">&lt;cm:property name=<span class="code-quote">"serverHostname"</span>
value=<span class="code-quote">"masterIP"</span>/&gt;</span>
...
</pre>
</div></div>
<h3><a name="JMSclusteringinGeronimo-Slavenode"></a>Slave node</h3>
<p>Because each master has only one slave in the Pure Master/Slave scenario, the slave
node must know the URI of the master node and also be tagged as a slave node by using the
<em>brokerName</em> attribute.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>activemq.xml</b></div><div class="codeContent
panelContent">
<pre class="code-xml">
...
       <span class="code-tag">&lt;cm:property name=<span class="code-quote">"serverHostname"</span>
value=<span class="code-quote">"slaveIP"</span>/&gt;</span>
...
</pre>
</div></div>

<h3><a name="JMSclusteringinGeronimo-Clientconnection"></a>Client connection</h3>
<p>JMS clients use the failover:// protocol to locate brokers in a cluster. See the
following example:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>failover://(tcp://masterIP:61616,tcp://slaveIP:61616)?randomize=false</p>
</div></div>


<h2><a name="JMSclusteringinGeronimo-SharedFilesystem"></a>Shared File system</h2>
<p>In this scenario, you must use a shared file system to provide high availability
of brokers and automatic discovery of master/slave nodes. The shared folder must allow different
slaves to have <em>write</em> permission.</p>
<h3><a name="JMSclusteringinGeronimo-Eachnode"></a>Each node</h3>
<p>On each node, configure a shared directory as the place where brokers are using the
<tt>persistenceAdapter</tt> element as follows:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>activemq.xml</b></div><div class="codeContent
panelContent">
<pre class="code-java">
...
       &lt;cm:property name=<span class="code-quote">"serverHostname"</span>
value=<span class="code-quote">"broker1"</span>/&gt;
...
       &lt;amq:persistenceAdapter&gt;
            &lt;amq:amqPersistenceAdapter directory=<span class="code-quote">"/sharedFileSystem/sharedBrokerData"</span>/&gt;
       &lt;/amq:persistenceAdapter&gt;
...
</pre>
</div></div>
<p>Note that:</p>
<ul>
	<li>For the shared file system on a Linux node, you must mount the shared directory
first.</li>
	<li>For the shared file system on a Windows node, you can use the path such as <tt>//ipAddress/sharedFolder</tt>
in the configuration.</li>
	<li>On each node, <em>broker1</em> should be replaced with the exact IP
address of current node.</li>
</ul>


<h3><a name="JMSclusteringinGeronimo-Clientconnection"></a>Client connection</h3>
<p>JMS clients use the failover:// protocol to locate brokers in a cluster. See the
following example:</p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>failover://(tcp://broker1:61616,tcp://broker2:61616,tcp://broker3:61616)?randomize=false</p>
</div></div>

<h2><a name="JMSclusteringinGeronimo-JDBCMasterSlave"></a>JDBC Master Slave</h2>
<p>In this scenario, you must use a shared database as the persistence enginee and automatic
recovery.</p>
<h3><a name="JMSclusteringinGeronimo-Eachnode"></a>Each node</h3>
<p>On each node, configure a shared database pool by using the <tt>jdbcPersistenceAdapter</tt>
element as follows. We use a remote Oracle database server as an example:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>activemq.xml</b></div><div class="codeContent
panelContent">
<pre class="code-java">
...
     &lt;cm:property name=<span class="code-quote">"serverHostname"</span>
value=<span class="code-quote">"broker1"</span>/&gt;
...
     &lt;amq:persistenceAdapter&gt;
         &lt;amq:jdbcPersistenceAdapter dataSource=<span class="code-quote">"#oracle-ds"</span>/&gt;
     &lt;/amq:persistenceAdapter&gt;
...
     &lt;bean id=<span class="code-quote">"oracle-ds"</span> class=<span
class="code-quote">"org.apache.commons.dbcp.BasicDataSource"</span> destroy-method=<span
class="code-quote">"close"</span>&gt;
      &lt;property name=<span class="code-quote">"driverClassName"</span>
value=<span class="code-quote">"oracle.jdbc.driver.OracleDriver"</span>/&gt;
      &lt;property name=<span class="code-quote">"url"</span> value=<span
class="code-quote">"jdbc:oracle:thin:@dbServer:1521:AMQDB"</span>/&gt;
      &lt;property name=<span class="code-quote">"username"</span> value=<span
class="code-quote">"scott"</span>/&gt;
      &lt;property name=<span class="code-quote">"password"</span> value=<span
class="code-quote">"tiger"</span>/&gt;
      &lt;property name=<span class="code-quote">"maxActive"</span> value=<span
class="code-quote">"200"</span>/&gt;
      &lt;property name=<span class="code-quote">"poolPreparedStatements"</span>
value=<span class="code-quote">"<span class="code-keyword">true</span>"</span>/&gt;
    &lt;/bean&gt;
...
</pre>
</div></div>
<p>Note that:</p>
<ul>
	<li>For the database server, <em>dbServer</em> should be replaced with
actual IP address of the database server.</li>
	<li>On each node, <em>broker1</em> should be replaced with the exact IP
address of current node.</li>
</ul>


<h3><a name="JMSclusteringinGeronimo-Clientconnection"></a>Client connection</h3>
<p>JMS clients use the failover:// protocol to locate brokers in a cluster. See the
following example: </p>
<div class="panel" style="border-width: 1px;"><div class="panelContent">
<p>failover://(tcp://broker1:61616,tcp://broker2:61616,tcp://broker3:61616)?randomize=false</p>
</div></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/JMS+clustering+in+Geronimo">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=23334725&revisedVersion=3&originalVersion=2">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/JMS+clustering+in+Geronimo?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message