geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v2.2 > EJB failover
Date Tue, 25 May 2010 09:44:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=GMOxDOC22&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="http://cwiki.apache.org/confluence/display/GMOxDOC22/EJB+failover">EJB
failover</a></h2>
    <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~carol%2Bh">Di
Hu</a>
    </h4>
        <br/>
                         <h4>Changes (8)</h4>
                                 
    
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-added-lines" style="background-color: #dfd;">OpenEJB
uses multicast to support failover for session bean. However it doesn&#39;t provide session
replication for stateful session bean. Geronimo uses WADI to add a session replication for
stateful session bean so that Geronimo can support failover for stateful session bean as well
as for stateless session bean. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-changed-lines" >h2. Unicast-based <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">support</span>
failover for stateless session bean <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">To
enable unicast-based support failover for stateless session bean, the wadi-clustering module
in GERONIMO_HOME\var\config\config.xml for each server node should be replaced with following
content: <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">In
addition to the session replication support, Wadi can also be configured to use unicast instead
of multicast to support failover for stateless session bean. To enable unicast-based failover
for stateless session bean, the wadi-clustering module in GERONIMO_HOME\var\config\config.xml
should be configured for each server node. Each static member has it&#39;s own gbean configuration
in the wadi-cluster module in config.xml. Ensure that you define all the static members in
it. The following example shows the configuration with two static members. <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" >		&lt;attribute name=&quot;domain&quot;&gt;test-domain&lt;/attribute&gt;
<br>		&lt;attribute name=&quot;UniqueId&quot;&gt;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0&lt;/attribute&gt;
<br></td></tr>
            <tr><td class="diff-changed-lines" >&lt;attribute <span class="diff-changed-words">name=&quot;host&quot;&gt;Node<span
class="diff-added-chars"style="background-color: #dfd;">1_</span>IP&lt;/attribute&gt;</span>
<br></td></tr>
            <tr><td class="diff-unchanged" >		&lt;reference name=&quot;nextWadiStaticMember&quot;&gt;
<br>			&lt;pattern&gt; <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >		&lt;attribute name=&quot;domain&quot;&gt;test-domain&lt;/attribute&gt;
<br>		&lt;attribute name=&quot;UniqueId&quot;&gt;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1&lt;/attribute&gt;
<br></td></tr>
            <tr><td class="diff-changed-lines" >&lt;attribute <span class="diff-changed-words">name=&quot;host&quot;&gt;Node<span
class="diff-added-chars"style="background-color: #dfd;">2_</span>IP&lt;/attribute&gt;</span>
<br></td></tr>
            <tr><td class="diff-unchanged" >		&lt;reference name=&quot;nextWadiStaticMember&quot;
/&gt; <br>	&lt;/gbean&gt; <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>where <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">_NodeIP_
is the IP address of the server node. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">_Node1_IP_
is the IP address of the first server node. <br>_Node2_IP_ is the IP address of the
second server node.  <br> <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
        </table>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>OpenEJB uses multicast to support failover for session bean. However it doesn't
provide session replication for stateful session bean. Geronimo uses WADI to add a session
replication for stateful session bean so that Geronimo can support failover for stateful session
bean as well as for stateless session bean.</p>

<h2><a name="EJBfailover-Unicastbasedfailoverforstatelesssessionbean"></a>Unicast-based
failover for stateless session bean </h2>
<p>In addition to the session replication support, Wadi can also be configured to use
unicast instead of multicast to support failover for stateless session bean. To enable unicast-based
failover for stateless session bean, the wadi-clustering module in GERONIMO_HOME\var\config\config.xml
should be configured for each server node. Each static member has it's own gbean configuration
in the wadi-cluster module in config.xml. Ensure that you define all the static members in
it. The following example shows the configuration with two static members.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;module name=<span class="code-quote">"org.apache.geronimo.configs/wadi-clustering/2.2.1-SNAPSHOT/car"</span>&gt;</span>
	<span class="code-tag">&lt;gbean name=<span class="code-quote">"DefaultBackingStrategyFactory"</span>&gt;</span>
		<span class="code-tag">&lt;attribute name=<span class="code-quote">"nbReplica"</span>&gt;</span>${ReplicaCount}<span
class="code-tag">&lt;/attribute&gt;</span>
	<span class="code-tag">&lt;/gbean&gt;</span>
	<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>4002<span
class="code-tag">&lt;/attribute&gt;</span>
		<span class="code-tag">&lt;attribute name=<span class="code-quote">"endPointURI"</span>&gt;</span>${EndPointURI}<span
class="code-tag">&lt;/attribute&gt;</span>
		<span class="code-tag">&lt;attribute name=<span class="code-quote">"clusterName"</span>&gt;</span>${WADIClusterName}<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.1-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>
	&lt;gbean
		name=<span class="code-quote">"org.apache.geronimo.configs/wadi-clustering/2.2.1-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/wadi-clustering/2.2.1-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>4002<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>Node1_IP<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.1-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>
	&lt;gbean
		name=<span class="code-quote">"org.apache.geronimo.configs/wadi-clustering/2.2.1-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/wadi-clustering/2.2.1-SNAPSHOT/car,j2eeType=GBean,name=secondStaticMember"</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>4003<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,1<span
class="code-tag">&lt;/attribute&gt;</span>
		<span class="code-tag">&lt;attribute name=<span class="code-quote">"host"</span>&gt;</span>Node2_IP<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;/gbean&gt;</span>
<span class="code-tag">&lt;/module&gt;</span>
</pre>
</div></div>

<p>where</p>

<p><em>Node1_IP</em> is the IP address of the first server node.<br/>
<em>Node2_IP</em> is the IP address of the second server node. </p>







    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="http://cwiki.apache.org/confluence/display/GMOxDOC22/EJB+failover">View
Online</a>
        |
        <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=21791056&revisedVersion=2&originalVersion=1">View
Changes</a>
                |
        <a href="http://cwiki.apache.org/confluence/display/GMOxDOC22/EJB+failover?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message