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 > WADI Clustering
Date Wed, 26 Jan 2011 03:44:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2036/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/WADI+Clustering">WADI
Clustering</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~maojia508">maojia</a>
    </h4>
        <br/>
                         <h4>Changes (31)</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-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{excerpt}Web-applications
and Stateful SessionBeans (Geronimo 2.2+) can be clustered by WADI.{excerpt} In order to cluster
these components, their Geronimo deployment descriptors are augmented with specific XML elements.
These elements define various clustering parameters controlling how underlying WADI&#39;s
components are wired and set-up upon application deployment. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{excerpt}
Staring from Geronimo version 2.2, Web applications and Stateful SessionBeans can be clustered
by WADI.{excerpt} To cluster these components, their Geronimo deployment descriptors are augmented
with specific XML elements. These elements define various clustering parameters controlling
how underlying WADI&#39;s components are wired and set up upon application deployment.
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>h2. Clustering Configurations
<br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">The
two following configurations, shipped out-of-the-box with JEE5 assemblies, must be installed
for clustering to work properly: <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Install
the following two configurations, shipped out-of-the-box with JEE5 assemblies, to support
the clustering: <br></td></tr>
            <tr><td class="diff-unchanged" >* _org.apache.geronimo.configs/clustering//car_:
it defines the runtime dependencies that clustered Web applications or EJB modules must have.
For instance, it imports the geronimo-clustering JAR into the classpath of such modules. Also,
it defines a _Node_ GBean defining the unique name of this Geronimo instance in the cluster.
<br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">In
order to give a specific name to your Geronimo instance, this module can be reconfigured by
updating the _clusterNodeName_ property defined within _var/config/config-substitutions.properties_:
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">To
give a specific name to your Geronimo instance, you can reconfigure this module by updating
the _clusterNodeName_ property defined within _var/config/config-substitutions.properties_:
<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>clusterNodeName=MyOwnNodeName
<br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" >* _org.apache.geronimo.configs/wadi-clustering//car_:
it defines WADI specific GBeans <span class="diff-added-words"style="background-color:
#dfd;">that are</span> used to further configure the behaviour of clustered applications
and the WADI group communication service shared by all clustered applications to communicate
with each others. <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">This
is in this module, by overriding the _DefaultBackingStrategyFactory_ GBean, that the default
number of replicas, 2, to be maintained across the cluster for a given HTTP session or SFSB
instance is configured. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">You
can use this module to override the _DefaultBackingStrategyFactory_ GBean to configure the
default number of replicas, which is set to 2 and maintained across the cluster for a given
HTTP session or SFSB instance. <br> <br></td></tr>
            <tr><td class="diff-unchanged" >These configurations are automatically
started when clustered applications are started. Hence, you should not start them explicitly.
<br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >h2. Creating a Static Wadi Configuration
<br> <br></td></tr>
            <tr><td class="diff-changed-lines" >Wadi can be configured to use
unicast instead of multicast.  To accomplish <span class="diff-changed-words">this<span
class="diff-added-chars"style="background-color: #dfd;"> configuration</span>,</span>
multiple additions need to be added to the wadi-cluster module configuraton in <span class="diff-changed-words"><span
class="diff-added-chars"style="background-color: #dfd;">{{</span>config.xml<span
class="diff-added-chars"style="background-color: #dfd;">}}</span>.</span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3.  Modifying DispatchHolder
GBean Configuration <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">To
successfully use a unicast configuraton, the multicast broadcast service needs to be disabled
using the disableMCastService attribute.   <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">To
successfully use a unicast configuraton, use the {{disableMCastService}} attribute to disable
the multicast broadcast service. <br></td></tr>
            <tr><td class="diff-unchanged" > <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{code}            <br> <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">It&#39;s
possible to</span> <span class="diff-added-words"style="background-color: #dfd;">You
can</span> specify the receiver port that the <span class="diff-changed-words"><span
class="diff-added-chars"style="background-color: #dfd;">{{</span>DispatcherHolder<span
class="diff-added-chars"style="background-color: #dfd;">}}</span></span> will
listen on for session updates.  If no port is <span class="diff-changed-words">specified<span
class="diff-added-chars"style="background-color: #dfd;">,</span></span> then
the first available port starting at port 4000 will be chosen automatically. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{code:xml} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">A
list of static members needs to be defined for a static configuration.  Each static member
will have it&#39;s own gbean configuration in config.xml in the wadi-cluster module. 
The DefaultDispatchHolder takes a reference to the first static member in the list. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">For
a static configuration, you need to define a list of static members.  Each static member will
have its own gbean configuration in {{config.xml}} in the wadi-cluster module. The {{DefaultDispatchHolder}}
takes a reference to the first static member in the list. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{code:xml} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >h3. Defining A Static Member <br>
<br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Each
static member in the configuration needs to be defined in config.xml.  A sample configuration
follows: <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">You
need to define each static member in the configuration in {{config.xml}}.  A sample configuration
is as follows: <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{code:xml} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >h4.  Static Member Attributes <br>
<br></td></tr>
            <tr><td class="diff-changed-lines" >* className (required) - The static
member <span class="diff-changed-words">class<span class="diff-added-chars"style="background-color:
#dfd;"> </span>name</span> within tomcat. <br></td></tr>
            <tr><td class="diff-unchanged" >* port - receiver port of the static
member. <br>* securePort - secure receiver port. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >* UniqueId (required) = Unique identifier
for this static member. <br>* host (required) = hostname or ip address of the static
member. <br></td></tr>
            <tr><td class="diff-changed-lines" >* nextWadiStaticMember = <span
class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Next</span>
<span class="diff-added-words"style="background-color: #dfd;">The next</span>
static member in the member list.  This can be left blank or left out completely if there
are no more static members. <br></td></tr>
            <tr><td class="diff-unchanged" > <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >h3. Updating your Deployment Descriptors
<br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Standard
and Geronimo specific deployment descriptors must be updated as follows: <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Deployment
descriptors and deployment plans must be updated as follows: <br></td></tr>
            <tr><td class="diff-changed-lines" >* <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">standard</span>
deployment descriptor, <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">i.e.
web.xml:</span> <span class="diff-added-words"style="background-color: #dfd;">for
example, {{web.xml}}:</span>  the Web application must be marked as distributable. In
other words, the optional &quot;distributable&quot; element must be defined: <br></td></tr>
            <tr><td class="diff-unchanged" >{code:xml} <br>&lt;web-app&gt;
<br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >&lt;/web-app&gt; <br>{code}
<br></td></tr>
            <tr><td class="diff-changed-lines" >* <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Geronimo</span>
deployment <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">descriptor,
i.e.</span> <span class="diff-added-words"style="background-color: #dfd;">plan,
for example</span> geronimo-web.xml:  if you are deploying the <span class="diff-added-words"style="background-color:
#dfd;">Web</span> application to embedded Jetty, then the &quot;clustering-wadi&quot;
substitution group must be defined. If you are deploying to embedded Tomcat, then you should
use the &quot;tomcat-clustering-wadi&quot; substitution group. These substitution
groups are defined by the XSDs geronimo-clustering-wadi-X.xsd and geronimo-tomcat-clustering-wadi-X.xsd
respectively which are included in the _schema_ folder of a Geronimo server installation.
<br></td></tr>
            <tr><td class="diff-unchanged" >Both of these elements provide a Web
application specific clustering configuration, which overrides the default clustering configuration.
This default clustering configuration is defined by the GBean _WADIJettyClusteringBuilder_
declared by _org.apache.geronimo.configs/jetty6-clustering-builder-wadi//car_. <br>Here
is an example Geronimo deployment descriptor targeted at Jetty embedded: <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >h3. Jetty Web-application Clustering
Configurations <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">The
two following configurations, shipped out-of-the-box with the JEE5 Jetty assemblies, must
be installed for clustering to work: <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Install
the following two configurations, shipped out-of-the-box with JEE5 assemblies, to support
the clustering: <br></td></tr>
            <tr><td class="diff-unchanged" >* _org.apache.geronimo.configs/jetty6-clustering-wadi//car_:
it defines runtime dependencies and Jetty6 clustering contracts. <br>* _org.apache.geronimo.configs/jetty6-clustering-builder-wadi//car_:
it defines deployment time dependencies along with a _JettyClusteringBuilder_ GBean declaring
the default clustering configuration. <br></td></tr>
            <tr><td class="diff-changed-lines" >This configuration must be running
when a clustered <span class="diff-changed-words">Web<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">-</span><span
class="diff-added-chars"style="background-color: #dfd;"> </span>application</span>
is started. If it is <span class="diff-changed-words">not<span class="diff-added-chars"style="background-color:
#dfd;"> running</span>,</span> then the substitution group _clustering-wadi_
is not properly recognized and the deployment fails. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3. Tomcat Web-application
Clustering Configurations <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >Tomcat configurations mirror Jetty&#39;s
<span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">ones</span>
except that jetty6-X artifact IDs should be replaced by tomcat6-X. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h2. Clustering of SFSB
<br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3. Updating Geronimo EJB
deployment plan <br></td></tr>
            <tr><td class="diff-changed-lines" >The Geronimo-specific deployment
plan for an EJB application, which is usually packaged as an EJB JAR file, is called *&quot;openejb-jar.xml&quot;*.
The *openejb-jar.xml* deployment plan is used <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">to</span>
in conjunction with the *ejb-jar.xml* Java EE deployment plan to deploy enterprise applications
to the Geronimo application server. <br>To enable WADI clustering for SFSB, add _openejb-clustering-wadi_
into the deployment plan as <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">followed:</span>
<span class="diff-added-words"style="background-color: #dfd;">follows:</span>
<br></td></tr>
            <tr><td class="diff-unchanged" >{code:xml} <br>&lt;openejb-jar
xmlns=&quot;http://openejb.apache.org/xml/ns/openejb-jar-2.2&quot;  <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3. Updating server configuration
<br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">The
two following configurations, shipped out-of-the-box with the JEE5 assemblies, must be installed
for clustering to work: <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Install
the following two configurations, shipped out-of-the-box with JEE5 assemblies, to support
the clustering: <br></td></tr>
            <tr><td class="diff-unchanged" >* _org.apache.geronimo.configs/openejb-clustering-wadi//car_:
it defines runtime dependencies and OpenEJB clustering contracts. <br>* _org.apache.geronimo.configs/openejb-clustering-builder-wadi//car_:
it defines deployment time dependencies along with a _OpenEJBClusteringBuilder_ GBean declaring
the default clustering configuration. <br></td></tr>
            <tr><td class="diff-changed-lines" >This configuration must be running
when a clustered SFSB is started. If it is <span class="diff-changed-words">not<span
class="diff-added-chars"style="background-color: #dfd;"> running</span>,</span>
then the substitution group _openejb-clustering-wadi_ is not properly recognized and the deployment
fails. <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/Tomcat+Native+Clustering"><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/Tomcat+Native+Clustering">Tomcat
Native Clustering</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;</td></tr></table></div>

<p> Staring from Geronimo version 2.2, Web applications and Stateful SessionBeans can
be clustered by WADI. To cluster these components, their Geronimo deployment descriptors are
augmented with specific XML elements. These elements define various clustering parameters
controlling how underlying WADI's components are wired and set up upon application deployment.</p>

<h2><a name="WADIClustering-ClusteringConfigurations"></a>Clustering Configurations</h2>

<p>Install the following two configurations, shipped out-of-the-box with JEE5 assemblies,
to support the clustering:</p>
<ul>
	<li><em>org.apache.geronimo.configs/clustering//car</em>: it defines the
runtime dependencies that clustered Web applications or EJB modules must have. For instance,
it imports the geronimo-clustering JAR into the classpath of such modules. Also, it defines
a <em>Node</em> GBean defining the unique name of this Geronimo instance in the
cluster.<br/>
To give a specific name to your Geronimo instance, you can reconfigure this module by updating
the <em>clusterNodeName</em> property defined within <em>var/config/config-substitutions.properties</em>:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
clusterNodeName=MyOwnNodeName
</pre>
</div></div></li>
	<li><em>org.apache.geronimo.configs/wadi-clustering//car</em>: it defines
WADI specific GBeans that are used to further configure the behaviour of clustered applications
and the WADI group communication service shared by all clustered applications to communicate
with each others.<br/>
You can use this module to override the <em>DefaultBackingStrategyFactory</em>
GBean to configure the default number of replicas, which is set to 2 and maintained across
the cluster for a given HTTP session or SFSB instance.</li>
</ul>


<p>These configurations are automatically started when clustered applications are started.
Hence, you should not start them explicitly.</p>



<h2><a name="WADIClustering-CreatingaStaticWadiConfiguration"></a>Creating
a Static Wadi Configuration</h2>

<p>Wadi can be configured to use unicast instead of multicast.  To accomplish this configuration,
multiple additions need to be added to the wadi-cluster module configuraton in <tt>config.xml</tt>.</p>

<h3><a name="WADIClustering-ModifyingDispatchHolderGBeanConfiguration"></a>Modifying
DispatchHolder GBean Configuration</h3>
<p>To successfully use a unicast configuraton, use the <tt>disableMCastService</tt>
attribute to disable the multicast broadcast service.</p>


<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;gbean name=<span class="code-quote">"DefaultDispatcherHolder"</span>&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"disableMCastService"</span>&gt;</span>true<span
class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
</pre>
</div></div>           

<p>You can specify the receiver port that the <tt>DispatcherHolder</tt>
will listen on for session updates.  If no port is specified, then the first available port
starting at port 4000 will be chosen automatically.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;gbean name=<span class="code-quote">"DefaultDispatcherHolder"</span>&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"disableMCastService"</span>&gt;</span>true<span
class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"receiverPort"</span>&gt;</span>4003<span
class="code-tag">&lt;/attribute&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
</pre>
</div></div>

<p>For a static configuration, you need to define a list of static members.  Each static
member will have its own gbean configuration in <tt>config.xml</tt> in the wadi-cluster
module. The <tt>DefaultDispatchHolder</tt> takes a reference to the first static
member in the list.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;gbean name=<span class="code-quote">"DefaultDispatcherHolder"</span>&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"disableMCastService"</span>&gt;</span>true<span
class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"receiverPort"</span>&gt;</span>4003<span
class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"staticMember"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span
class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>wadi-clustering<span
class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span
class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>firstStaticMember<span
class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
</pre>
</div></div>

<h3><a name="WADIClustering-DefiningAStaticMember"></a>Defining A Static
Member</h3>

<p>You need to define each static member in the configuration in <tt>config.xml</tt>.
 A sample configuration is as follows:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/wadi-clustering/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/wadi-clustering/2.2-SNAPSHOT/car,j2eeType=GBean,name=firstStaticMember"</span>
       gbeanInfo=<span class="code-quote">"org.apache.geronimo.clustering.wadi.WadiStaticMember"</span>&gt;
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"className"</span>&gt;</span>org.apache.catalina.tribes.membership.StaticMember<span
class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"port"</span>&gt;</span>4001<span
class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"securePort"</span>&gt;</span>-1<span
class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"domain"</span>&gt;</span>test-domain<span
class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"UniqueId"</span>&gt;</span>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0<span
class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;attribute name=<span class="code-quote">"host"</span>&gt;</span>9.27.163.151<span
class="code-tag">&lt;/attribute&gt;</span>
    <span class="code-tag">&lt;reference name=<span class="code-quote">"nextWadiStaticMember"</span>&gt;</span>
        <span class="code-tag">&lt;pattern&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>org.apache.geronimo.configs<span
class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>wadi-clustering<span
class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>2.2-SNAPSHOT<span
class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>car<span class="code-tag">&lt;/type&gt;</span>
            <span class="code-tag">&lt;name&gt;</span>secondStaticMember<span
class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;/pattern&gt;</span>
    <span class="code-tag">&lt;/reference&gt;</span>
<span class="code-tag">&lt;/gbean&gt;</span>
</pre>
</div></div>

<h4><a name="WADIClustering-StaticMemberAttributes"></a>Static Member Attributes</h4>

<ul>
	<li>className (required) - The static member class name within tomcat.</li>
	<li>port - receiver port of the static member.</li>
	<li>securePort - secure receiver port.</li>
	<li>domain (required) = cluster domain.</li>
	<li>UniqueId (required) = Unique identifier for this static member.</li>
	<li>host (required) = hostname or ip address of the static member.</li>
	<li>nextWadiStaticMember = The next static member in the member list.  This can be
left blank or left out completely if there are no more static members.</li>
</ul>



<h2><a name="WADIClustering-ClusteringofWebapplications"></a>Clustering
of Web-applications</h2>


<h3><a name="WADIClustering-UpdatingyourDeploymentDescriptors"></a>Updating
your Deployment Descriptors</h3>

<p>Deployment descriptors and deployment plans must be updated as follows:</p>
<ul>
	<li>deployment descriptor, for example, <tt>web.xml</tt>:  the Web application
must be marked as distributable. In other words, the optional "distributable" element must
be defined:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;web-app&gt;</span>
.....
    <span class="code-tag">&lt;distributable/&gt;</span>
.....
<span class="code-tag">&lt;/web-app&gt;</span>
</pre>
</div></div></li>
	<li>deployment plan, for example geronimo-web.xml:  if you are deploying the Web application
to embedded Jetty, then the "clustering-wadi" substitution group must be defined. If you are
deploying to embedded Tomcat, then you should use the "tomcat-clustering-wadi" substitution
group. These substitution groups are defined by the XSDs geronimo-clustering-wadi-X.xsd and
geronimo-tomcat-clustering-wadi-X.xsd respectively which are included in the <em>schema</em>
folder of a Geronimo server installation.<br/>
Both of these elements provide a Web application specific clustering configuration, which
overrides the default clustering configuration. This default clustering configuration is defined
by the GBean <em>WADIJettyClusteringBuilder</em> declared by <em>org.apache.geronimo.configs/jetty6-clustering-builder-wadi//car</em>.<br/>
Here is an example Geronimo deployment descriptor targeted at Jetty embedded:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;?xml version=<span class="code-quote">"1.0"</span>
encoding=<span class="code-quote">"UTF-8"</span>?&gt;</span>
<span class="code-tag">&lt;web-app xmlns=<span class="code-quote">"http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.2"</span>&gt;</span>

    <span class="code-tag">&lt;environment&gt;</span>
        <span class="code-tag">&lt;moduleId&gt;</span>
            <span class="code-tag">&lt;groupId&gt;</span>yourGroupId<span
class="code-tag">&lt;/groupId&gt;</span>
            <span class="code-tag">&lt;artifactId&gt;</span>yourArtifactId<span
class="code-tag">&lt;/artifactId&gt;</span>
            <span class="code-tag">&lt;version&gt;</span>YourVersion<span
class="code-tag">&lt;/version&gt;</span>
            <span class="code-tag">&lt;type&gt;</span>war<span class="code-tag">&lt;/type&gt;</span>
        <span class="code-tag">&lt;/moduleId&gt;</span>
    <span class="code-tag">&lt;/environment&gt;</span>

   <span class="code-tag">&lt;context-root&gt;</span>/yourPath<span
class="code-tag">&lt;/context-root&gt;</span>

   <span class="code-tag">&lt;clustering-wadi/&gt;</span>

<span class="code-tag">&lt;/web-app&gt;</span>
</pre>
</div></div></li>
</ul>


<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td>If you are using a Tomcat assembly
of Geronimo distribution, replace <tt>&lt;clustering-wadi/&gt;</tt> with
<tt>&lt;tomcat-clustering-wadi/&gt;</tt> element in the deployment plan.</td></tr></table></div>

<h3><a name="WADIClustering-JettyWebapplicationClusteringConfigurations"></a>Jetty
Web-application Clustering Configurations</h3>

<p>Install the following two configurations, shipped out-of-the-box with JEE5 assemblies,
to support the clustering:</p>
<ul>
	<li><em>org.apache.geronimo.configs/jetty6-clustering-wadi//car</em>: it
defines runtime dependencies and Jetty6 clustering contracts.</li>
	<li><em>org.apache.geronimo.configs/jetty6-clustering-builder-wadi//car</em>:
it defines deployment time dependencies along with a <em>JettyClusteringBuilder</em>
GBean declaring the default clustering configuration.<br/>
This configuration must be running when a clustered Web application is started. If it is not
running, then the substitution group <em>clustering-wadi</em> is not properly
recognized and the deployment fails.</li>
</ul>


<h3><a name="WADIClustering-TomcatWebapplicationClusteringConfigurations"></a>Tomcat
Web-application Clustering Configurations</h3>

<p>Tomcat configurations mirror Jetty's except that jetty6-X artifact IDs should be
replaced by tomcat6-X.</p>

<h2><a name="WADIClustering-ClusteringofSFSB"></a>Clustering of SFSB</h2>

<p>Geronimo uses the OpenEJB container for providing EJB services. And Geronimo now
has some basic support for SFSB clustering such as state replication between cluster members.
Basically the server cluster members maintain membership information using multicast heartbeats
and the ejb client maintains a list of servers to change target server based on availability.
Each multicast packet contains a single URI that advertises a service, its group, and its
location in the form of "cluster1:ejb:ejbd://thehost:4201".</p>


<h3><a name="WADIClustering-UpdatingGeronimoEJBdeploymentplan"></a>Updating
Geronimo EJB deployment plan</h3>
<p>The Geronimo-specific deployment plan for an EJB application, which is usually packaged
as an EJB JAR file, is called <b>"openejb-jar.xml"</b>. The <b>openejb-jar.xml</b>
deployment plan is used in conjunction with the <b>ejb-jar.xml</b> Java EE deployment
plan to deploy enterprise applications to the Geronimo application server. <br/>
To enable WADI clustering for SFSB, add <em>openejb-clustering-wadi</em> into
the deployment plan as follows:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
&lt;openejb-jar xmlns=<span class="code-quote">"http://openejb.apache.org/xml/ns/openejb-jar-2.2"</span>

             <span class="code-keyword">xmlns:sys</span>=<span class="code-quote">"http://geronimo.apache.org/xml/ns/deployment-1.2"</span>&gt;

...
  <span class="code-tag">&lt;openejb-clustering-wadi/&gt;</span>
<span class="code-tag">&lt;/openejb-jar&gt;</span>
</pre>
</div></div>

<h3><a name="WADIClustering-Updatingserverconfiguration"></a>Updating server
configuration</h3>
<p>Install the following two configurations, shipped out-of-the-box with JEE5 assemblies,
to support the clustering:</p>
<ul>
	<li><em>org.apache.geronimo.configs/openejb-clustering-wadi//car</em>:
it defines runtime dependencies and OpenEJB clustering contracts.</li>
	<li><em>org.apache.geronimo.configs/openejb-clustering-builder-wadi//car</em>:
it defines deployment time dependencies along with a <em>OpenEJBClusteringBuilder</em>
GBean declaring the default clustering configuration.<br/>
This configuration must be running when a clustered SFSB is started. If it is not running,
then the substitution group <em>openejb-clustering-wadi</em> is not properly recognized
and the deployment fails.</li>
</ul>




    </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/WADI+Clustering">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=20645453&revisedVersion=2&originalVersion=1">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/WADI+Clustering?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message