Author: rajika
Date: Sat Jun 27 00:33:28 2009
New Revision: 40121
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=40121

Log:
Added endpoint guide.

Added:
   branches/esb/java/2.1/product/docs/resources/images/endpoint-info.png   
(contents, props changed)
   branches/esb/java/2.1/product/docs/resources/images/endpoint-mbean.png   
(contents, props changed)
   branches/esb/java/2.1/product/docs/resources/images/endpoint-off.png   
(contents, props changed)
   branches/esb/java/2.1/product/docs/resources/images/endpoint-state.png   
(contents, props changed)
   branches/esb/java/2.1/product/docs/resources/images/endpoint-turn-off.png   
(contents, props changed)
   branches/esb/java/2.1/product/docs/resources/images/jconsole-mbean.png   
(contents, props changed)
   branches/esb/java/2.1/product/docs/xdoc/endpoint_guide.xml

Added: branches/esb/java/2.1/product/docs/resources/images/endpoint-info.png
URL: 
http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/resources/images/endpoint-info.png?pathrev=40121
==============================================================================
Binary file. No diff available.

Added: branches/esb/java/2.1/product/docs/resources/images/endpoint-mbean.png
URL: 
http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/resources/images/endpoint-mbean.png?pathrev=40121
==============================================================================
Binary file. No diff available.

Added: branches/esb/java/2.1/product/docs/resources/images/endpoint-off.png
URL: 
http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/resources/images/endpoint-off.png?pathrev=40121
==============================================================================
Binary file. No diff available.

Added: branches/esb/java/2.1/product/docs/resources/images/endpoint-state.png
URL: 
http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/resources/images/endpoint-state.png?pathrev=40121
==============================================================================
Binary file. No diff available.

Added: branches/esb/java/2.1/product/docs/resources/images/endpoint-turn-off.png
URL: 
http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/resources/images/endpoint-turn-off.png?pathrev=40121
==============================================================================
Binary file. No diff available.

Added: branches/esb/java/2.1/product/docs/resources/images/jconsole-mbean.png
URL: 
http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/resources/images/jconsole-mbean.png?pathrev=40121
==============================================================================
Binary file. No diff available.

Added: branches/esb/java/2.1/product/docs/xdoc/endpoint_guide.xml
URL: 
http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/xdoc/endpoint_guide.xml?pathrev=40121
==============================================================================
--- (empty file)
+++ branches/esb/java/2.1/product/docs/xdoc/endpoint_guide.xml  Sat Jun 27 
00:33:28 2009
@@ -0,0 +1,506 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+  ~  Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights 
Reserved.
+  ~
+  ~  WSO2 Inc. licenses this file to you under the Apache License,
+  ~  Version 2.0 (the "License"); you may not use this file except
+  ~  in compliance with the License.
+  ~  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  ~
+  -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+  <title>WSO2 ESB - Endpoint Guide </title>
+  <link href="css/esb-docs.css" rel="stylesheet" />
+  <link href="styles/dist-docs.css" rel="stylesheet" type="text/css"
+  media="all" />
+</head>
+
+
+<body xml:lang="en">
+<h2>Endpoint Guide</h2>
+<h3>Endpoints</h3>
+<p>An endpoint
+defines an external destination for an outgoing message through WSO2
+ESB. An &lt;endpoint&gt; element defines an endpoint in the
+configuration. An endpoint may be specified as an address endpoint, WSDL based 
endpoint, a load
+balancing endpoint or a fail-over endpoint as follows:
+</p>
+
+<pre  xml:space="preserve">
+    &lt;endpoint [name="string"] [key="string"]&gt;
+        address-endpoint | default-endpoint | wsdl-endpoint | 
load-balanced-endpoint | fail-over-endpoint
+    &lt;/endpoint&gt;
+</pre>
+<p>
+All the types of endpoints can have a name attribute which specify the name of 
the endpoint  and  such named endpoints
+    can be referred by other endpoints using a key attribute. For example if 
there is an endpoint named as "foo",
+the following endpoint can be used in any place, where "foo" has to be used.
+</p>
+
+<pre  xml:space="preserve">
+    &lt;endpoint key="foo"/&gt;    
+</pre>
+<p>This let the users to reuse the already defined endpoints  in several 
places.</p>
+<p>The endpoints also have a trace attribute which turns on detailed trace 
information for messages being sent to the
+    endpoint. These are available in the trace.log configured via the 
log4j.properties file(which can be found within
+    lib folder once you unzip wso2 ESB zip). Setting the trace log level to 
TRACE will dump detailed trace information
+    including message payloads.
+</p>
+<p>
+At any given time an endpoint can be one of the following four states.</p>
+
+<p><b>[1] Active</b> - Endpoint is active and running.</p>
+<p><b>[2] TimeOut </b>- The endpoint can be in TimeOut state if
+    we get a timeout error when invoking the endpoint (because the endpoint is 
currently unavailable or due to a
+    network failure) or if it returns a previously defined error code for 
timeout state, the endpoint said to be in
+    TimeOut state.  The possible error codes can be found in the <a 
title="SynapseConstant class" target="_blank"
+    
href="https://svn.apache.org/repos/asf/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java";
+    id="or6m">SynapseConstant class</a> (under the endpoint failure section). 
The configuration section for this
+    state called <b><i>markForSuspension</i></b>.If a previously defined  
error code is and if it does have a positive
+    retrieve count (see the configuration section below) the endpoint will be 
retrieve again(the number of time to
+    retrieve can be configured using the same configuration element) and if it 
fails in further attempts it will transfer
+    into <b>Suspended</b> state. </p>
+<p><b>[3] Suspended</b> - When invoking the endpoint if a previously defined 
error code for Suspended state is returned
+    or a if a TimeOut endpoint fails in further attempts  the endpoint is said 
to be in <b>Suspended</b> state.
+    The endpoint can goes into Active state once the suspend duration is over. 
 The configuration section
+    called <b><i>suspendOnFailure</i></b>.</p>
+<p><b>[4] Switch Off</b> - The endpoint is moved into maintains mode.
+</p>
+
+<p>
+A state transfer between any state to <b>Switch off</b> state can be done only 
manually using JMX based API.
+    And also an endpoint which is in <b>SwitchOff</b> state can only transfer 
into <b>Active state</b> again using
+    the JMX based API. See section on using JMX based API to learn how to do 
this.
+</p>
+
+<p>
+The state transition between states can be shown as follows.
+</p>
+
+<div id="endpoint-state" style="text-align: left;"><img style="width: 648px; 
height: 267.568px;"
+                 alt="endpoint-state-image" 
src="../resources/images/endpoint-state.png"/></div>
+<p>Figure1: The state transition between states in an endpoint</p>    
+
+<h4>Using jconsole to manage state transition between states</h4>
+
+<p>The jconsole tool is a JMX-compliant graphical tool for monitoring a Java 
virtual machine. If you have installed
+    java you'll automatically get this tool. We'll add an endpoint (name 
'ep1') and monitor the states transition
+    between states in ep1
+</p>
+
+<p>1. Add an address endpoint called 'ep1'. Refer endpoint userguide to see 
how this can be done.</p>
+<p>2. Start jconsole by typing jconsole at your termnial, if you encounter any 
problem please consult your operatying
+    system guide. You'll see the following console once you select Mbeans tab. 
</p>
+
+<div id="jconsole" style="text-align: left;"><img style="width: 648px; height: 
414.212px;"
+               alt="jconsole-mbean-tab" 
src="../resources/images/jconsole-mbean.png"/></div>
+
+<p>Figure2: Jconsole Mbeans tab</p>
+<p>3.Go to org.apache.synpase menu from left hand and expand it. You'll see 
the following figure with the
+    endpoint ep1 that we just added.
+</p>
+
+<div id="jconsole-endpoint" style="text-align: left;"><img style="width: 
648px; height: 560.852px;"
+                                alt="endpoint-mbean-show" 
src="../resources/images/endpoint-mbean.png"/></div>
+<p>Figure3: Endpoint Mbean is selected </p>
+
+<p>4. Select the ep1 endpoint and you'll see the information related to this 
endpoint and please note that the state
+    is given as active as the first entry and value is set to true. The 
endpoint is in active state.
+</p>
+<div id="endpoint-info" style="text-align: left;"><img style="width: 648px; 
height: 402.848px;"
+       alt="endpoint-information-image" 
src="../resources/images/endpoint-info.png"/></div>
+<p>Figure4: The ep1 endpoint attributes. The endpoint is active.</p>
+
+<p>5. Now go to the Operations tab and switch off the endpoint. You'll see a 
message saying the
+    operation was successful.
+</p>
+<div id="endpoin-off" style="text-align: left;"><img
+     alt="endpoint-off-image"   style="width: 648px; height: 713.229px;" 
src="../resources/images/endpoint-off.png"/></div>
+<p>Figure5: Switching off the endpoint.</p>
+
+<p>You'll also see a INFO level log message saying that the endpoint was 
switched off manually.</p>
+
+<p><font style="font-family: Courier New;" size="3">[2009-06-23 12:18:21,149] 
INFO - EndpointContext Manually switching off endpoint : ep1</font></p>
+
+<p>6. Next again switch back to Attributes tab and see the state of the 
endpoint after refreshing it. You'll see
+    endpoint is inactive and the endpoint is in switch off state. At this 
point if you try to use a client which
+    use this endpoint you'll see it fails since the endpoint is down. You can 
use a similar approach activate the
+    endpoint back.
+</p>
+    
+<div id="y.8h" style="text-align: left;"><img style="width: 648px; height: 
336.767px;"
+      alt="endpoint-switched-off-image" 
src="../resources/images/endpoint-turn-off.png"/></div>
+<p>Figure6: Endpoint is in Switch off state.</p>
+
+<h3>Address Endpoint</h3>
+<p>Address endpoint is an endpoint defined by specifying the EPR (Endpoint 
Reference) and other attributes
+    of the configuration.</p>
+
+<h4>Address endpoint configuration</h4>
+
+<pre xml:space="preserve">
+&lt;address uri="<i>endpoint address</i>" [format="soap11|soap12|pox|get"] 
[optimize="mtom|swa"]
+    [encoding="<i>charset encoding</i>"]
+    [statistics="enable|disable"] [trace="enable|disable"]&gt;
+
+    &lt;enableRM [policy="<i>key</i>"]/&gt;?
+    &lt;enableSec [policy="<i>key</i>"]/&gt;?
+    &lt;enableAddressing [version="final|submission"] 
[separateListener="true|false"]/&gt;?
+
+    &lt;timeout&gt;
+        &lt;duration&gt;<i>timeout duration in seconds</i>&lt;/duration&gt;
+        &lt;action&gt;discard|fault&lt;/action&gt;
+    &lt;/timeout&gt;?
+
+    &lt;markForSuspension&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;retriesBeforeSuspension&gt;m&lt;/retriesBeforeSuspension&gt;
+        &lt;retryDelay&gt;d&lt;/retryDelay&gt;
+    &lt;/markForSuspension&gt;
+    
+    &lt;suspendOnFailure&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;initialDuration&gt;n&lt;/initialDuration&gt;
+        &lt;progressionFactor&gt;r&lt;/progressionFactor&gt;
+        &lt;maximumDuration&gt;l&lt;/maximumDuration&gt;
+    &lt;/suspendOnFailure&gt;
+&lt;/address&gt;
+</pre>
+
+<h5>Address endpoint attributes</h5>
+<div><table class="" id="grrh" border="1"  cellpadding="3" cellspacing="0" 
+            width="1488"><tbody>
+    <tr><td width="50%">uri<br/></td><td width="50%">EPR of the target 
endpoint.
+    See the table below for a possible list of transports.<br/></td></tr>
+    <tr><td width="50%">format<br/></td><td width="50%">Message format for the 
endpoint.<br/></td></tr>
+    <tr><td width="50%">optimize<br/></td><td width="50%">Method to optimize 
the attachments.<br/></td></tr>
+    <tr><td width="50%">encoding<br/></td><td width="50%">The charset encoding 
to use for the endpoint.<br/></td></tr>
+    <tr><td width="50%">statistics<br/></td><td width="50%">This enables 
statistics for the endpoint.<br/></td></tr>
+    <tr><td width="50%">trace<br/></td><td width="50%">This enables trace for 
the endpoint.<br/></td></tr>
+</tbody></table></div>
+
+<h5>QoS for the endpoint</h5>
+<p>QoS (Quility of service) aspects such as WS-RM(WS-Reliable messaging), 
WS-Security  and WS-Addressing may be
+    enabled on messages send to an endpoint using <b>enableRM, enableSec</b> 
and <b>enableAddressing</b>
+    elements. Optionally, the WS-RM and WS-Security policies could be 
specified using <i><b>policy</b></i> attribute.
+</p>
+<h5>QoS configuration</h5>
+
+<div><table class="" id="v1c." border="1"  cellpadding="3" cellspacing="0"  
width="1490">
+    <tbody>
+        <tr><td width="50%">enableRM [policy="<i>key</i>"]<br/></td><td 
width="50%">This enables WS-Reliable messaging
+            for the message which goes for the endpoint. The optional 
<i>policy</i> attribute specify the WS-RM
+            policy.<br/></td></tr>
+        <tr><td width="50%">enableSec [policy="<i>key</i>"]<br/></td><td 
width="50%">This enables WS-Security for
+            the message which goes for the endpoint. The optional 
<i>policy</i> attribute specify the WS-Security
+            policy.<br/></td></tr>
+        <tr><td width="50%">enableAddressing [version="final | submission"] 
[seperateListener=" true | false"]<br/>
+        </td><td width="50%">This enables WS-Addressing for the message which 
goes for the endpoint. User can specify
+            to have seperate listener with version final or submission. 
<br/></td></tr>
+    </tbody></table></div>
+
+<h5>Endpoint timeout</h5>
+<p>Address(and also WSDL) endpoints can timeout if the response fails to 
arrive at Synapse by a predefined
+    timeout duration specified in seconds. The timeout action specifies 
whether to discard reponse that arives
+    later, or to trigger a fault. Synapse has a periodic timeout handler that 
triggers itself at each 15 seconds
+    interval. Thus endpoint timeout will have a +/- erroce on trigger time. 
Though this can be minimized by
+    setting a System property "synapse.timeout_handler_interval"(This property 
can be set in synapse.properties
+    synpase property file which is located in conf directory inside repository 
once you unzipped WSO2 ESB )
+    to a millisecond duration below the   desired endpoint timeout, <b>care 
must be taken as a lesser value may have a
+    higher overhead on the system.</b></p>
+
+<h5>timeout configuration</h5>
+<div><table class="" id="cs2_" border="1"  cellpadding="3" cellspacing="0"  
width="1493">
+    <tbody>
+        <tr><td width="50%">duration<br/></td><td width="50%">Timeout duration 
in second. <br/></td></tr>
+        <tr><td width="50%">action<br/></td><td width="50%">Once a timeout 
occurs the action to perform, avilable
+            options are <i>discard</i> (discard the response which arrives 
late) or <i>fault</i> (trigger a fault)
+        .<br/></td></tr>
+    </tbody></table></div>
+
+<h5>Marking endpoint for suspension</h5>
+<p>As described before (see description on Timeout state above) this 
configuration element describes the configuration
+    for a timeout endpoint.
+</p>
+<h5>markForSuspension configuration</h5>
+<div><table class="" id="aliw" border="1"  cellpadding="3" cellspacing="0"  
width="1496">
+    <tbody><tr><td width="50%">errorCodes<br/></td><td width="50%">A comma 
separated error code list which can be
+        returned by the endpoint. See <a title="SynpaseConstant" 
target="_blank"
+        
href="https://svn.apache.org/repos/asf/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java";
+        >SynpaseConstant</a> class for a possible list of error codes. 
<br/></td></tr>
+        <tr><td>retriesBeforeSuspension</td><td>Number of retries before go 
into suspended
+            state.<br/></td></tr>
+        <tr><td>retryDelay</td><td><font size="3">The delay between each 
try.<br/></font></td></tr>
+    </tbody></table></div>
+<h5>Suspending endpoint on failure</h5>
+<p>Address (and also WSDL) endpoint can be put into suspended state if it is 
detected as failed. An endpoint that
+    fails may be suspended for a specified duration after such a failure, 
during which new messages will not be
+    processed through the endpoint. The amount of time waiting before next 
attempt follows a
+    <a title="geometric series" target="_blank" 
href="http://en.wikipedia.org/wiki/Geometric_series"; id="r-md">geometric 
series.</a>
+    <br/>
+Ex: Suppose T<sub>1</sub>, T<sub>2</sub>, T<sub>3</sub>....T<sub>n</sub> are 
suspended duration before next
+    attempt. The T<sub>1</sub>, T<sub>2</sub>, T<sub>3</sub>...T<sub>n</sub> 
can be defined as follows:<br/>
+T<sub>1</sub> = a <br/>
+T<sub>2</sub> = a + ar<br/>
+T<sub>3</sub> = a + ar + ar<sup>2</sup><br/>
+.<br/>
+.<br/>
+.<br/>
+T<sub>n</sub> = a + ar<sup>2</sup> + ... + ar<sup>n</sup><br/>
+<br/>
+where 'a' is the initially defined duration to suspend the endpoint for first 
fail attempt and 'r' is the
+    progression factor (which is specified by the user) by which the user need 
to increase the previous value.
+    <br/>
+</p>
+
+<h5>suspendOnFailure configuration</h5>
+<div>
+<table class="" id="ieu9" border="1"  cellpadding="3" cellspacing="0"  
width="1499">
+<tbody>
+<tr>
+<td width="50%">errorCode<br/>
+</td>
+<td width="50%">A comma separated error code list which can be returned by the 
endpoint. See <a title="SynpaseConstant" target="_blank"
+        
href="https://svn.apache.org/repos/asf/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java";
+        >SynpaseConstant</a> class for a possible list of error codes. <br/>
+</td>
+</tr>
+<tr>
+<td  width="50%">
+initialDuration
+</td>
+<td width="50%">Initial duration to suspend the endpoint.<br/>
+</td>
+</tr>
+<tr>
+<td  width="50%">
+progressionFactor
+</td>
+<td width="50%">The progression factor for the geometric series. See above for 
a more detailed description.<br/>
+</td>
+</tr>
+<tr>
+<td width="50%">
+maximumDuration
+</td>
+<td width="50%">Maximum duration to suspend the endpoint. <br/>
+</td>
+</tr>
+</tbody>
+</table>
+</div>
+
+<h5>Following are the sample address URI definitions. </h5>
+<div>
+<table class="" id="aq95" border="1"  cellpadding="3" cellspacing="0"  
width="1495">
+<tbody>
+<tr>
+<td width="50%">Transport<br/>
+</td>
+<td width="50%">Sample Address<br/>
+</td>
+</tr>
+<tr>
+<td width="50%">HTTP<br/>
+</td>
+<td width="50%">http://localhost:9000/services/SimpleStockQuoteService</td>
+</tr>
+<tr>
+<td width="50%">JMS<br/>
+</td>
+<td width="50%">jms:/SimpleStockQuoteService?<br/>
+              
transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;<br/>
+              
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;<br/>
+              java.naming.provider.url=tcp://localhost:61616&amp;<br/>
+              transport.jms.DestinationType=topic</td>
+</tr>
+<tr>
+<td width="50%">Mail<br/>
+</td>
+<td width="50%">mailto:gu...@host</td>
+</tr>
+<tr>
+<td width="50%">VFS<br/>
+</td>
+<td width="50%">vfs:file:///home/user/directory<br/>
+    vfs:file:///home/user/file<br/>
+    vfs:ftp://guest:gu...@localhost/directory?vfs.passive=true
+</td>
+</tr>
+<tr>
+<td width="50%">FIX<br/>
+</td>
+<td 
width="50%">fix://host:port?BeginString=FIX4.4&amp;SenderCompID=WSO2&amp;TargetCompID=APACHE<br/>
+<br/>
+</td>
+</tr>
+</tbody>
+</table>
+</div>
+
+<h3>Default Endpoint</h3>
+<p>Default endpoint is an endpoint defined for adding QoS and other 
configurations
+      to the endpoint which is resolved from the 'To' address of the message 
context.
+      All the configurations such as message format for the endpoint, the 
method
+      to optimize attachments, reliable messaging, security policies for the 
endpoint
+      can be specified as in the Address Endpoint. This endpoint differs from 
the address
+      endpoint only in the uri attribute which will not be present in this 
endpoint.
+      Following section describes the configuration of a default endpoint.</p>
+<h4>Default endpoint configuration</h4>
+<pre xml:space="preserve">
+&lt;default [format="soap11|soap12|pox|get"] [optimize="mtom|swa"]
+     [encoding="<i>charset encoding</i>"]
+     [statistics="enable|disable"] [trace="enable|disable"]&gt;
+
+    &lt;enableRM [policy="<i>key</i>"]/&gt;?
+    &lt;enableSec [policy="<i>key</i>"]/&gt;?
+    &lt;enableAddressing [version="final|submission"] 
[separateListener="true|false"]/&gt;?
+
+    &lt;timeout&gt;
+        &lt;duration&gt;<i>timeout duration in seconds</i>&lt;/duration&gt;
+        &lt;action&gt;discard|fault&lt;/action&gt;
+    &lt;/timeout&gt;?
+
+    &lt;markForSuspension&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;retriesBeforeSuspension&gt;m&lt;/retriesBeforeSuspension&gt;
+        &lt;retryDelay&gt;d&lt;/retryDelay&gt;
+    &lt;/markForSuspension&gt;
+
+    &lt;suspendOnFailure&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;initialDuration&gt;n&lt;/initialDuration&gt;
+        &lt;progressionFactor&gt;r&lt;/progressionFactor&gt;
+        &lt;maximumDuration&gt;l&lt;/maximumDuration&gt;
+    &lt;/suspendOnFailure&gt;
+&lt;/default&gt;
+</pre>
+
+<h3>WSDL endpoint</h3>
+<p>WSDL endpoint is an endpoint definition based on a specified WSDL document. 
The WSDL document can be specified
+    either as a URI or as an inlined definition within the configuration. The 
service and port name
+    containing the target EPR has to be specified with the 'service' and 
'port' (or 'endpoint') attributes
+    respectively. enableRM, enableSec, enableAddressing, 
suspendDurationOnFailure and timeout elements are same
+    as for an Address endpoint.</p>
+
+<h4>WSDL endpoint configuration</h4>
+<pre xml:space="preserve">
+&lt;wsdl [uri="wsdl-uri"] service="qname" port/endpoint="qname"&gt;
+    &lt;wsdl:definition&gt;...&lt;/wsdl:definition&gt;?
+    &lt;wsdl20:description&gt;...&lt;/wsdl20:description&gt;?
+    &lt;enableRM [policy="key"]/&gt;?
+    &lt;enableSec [policy="key"]/&gt;?
+    &lt;enableAddressing/&gt;?
+
+    &lt;timeout&gt;
+        &lt;duration&gt;<i>timeout duration in seconds</i>&lt;/duration&gt;
+        &lt;action&gt;discard|fault&lt;/action&gt;
+    &lt;/timeout&gt;?
+
+    &lt;markForSuspension&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;retriesBeforeSuspension&gt;m&lt;/retriesBeforeSuspension&gt;
+        &lt;retryDelay&gt;d&lt;/retryDelay&gt;
+    &lt;/markForSuspension&gt;
+
+    &lt;suspendOnFailure&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;initialDuration&gt;n&lt;/initialDuration&gt;
+        &lt;progressionFactor&gt;r&lt;/progressionFactor&gt;
+        &lt;maximumDuration&gt;l&lt;/maximumDuration&gt;
+    &lt;/suspendOnFailure&gt;
+&lt;/wsdl&gt;
+</pre>
+
+<h3>Load balance Endpoint</h3>
+<p>A Load balanced endpoint distributes the messages (load) arriving at it
+      among a set of listed endpoints or static members by evaluating the load 
balancing policy
+      and any other relevant parameters. The policy attribute of the load 
balance
+      element specifies the load balance policy (algorithm) to be used for
+      selecting the target endpoint or static member. Currently only the 
roundRobin policy is
+      supported. The failover attribute determines if the next endpoint or 
static member should be
+      selected once the currently selected endpoint or static member has 
failed, and defaults to
+      true. The set of endpoints or static members amongst which the load has 
to be distributed
+      can be listed under the 'loadBalance' element. These endpoints can 
belong to any
+      endpoint type mentioned in this document. For example, failover endpoints
+      can be listed inside the load balance endpoint to load balance between
+      failover groups etc. The loadbalance element cannot have both endpoint 
&amp; member child
+      elements in the same configuration. In the case of the member child 
element, the <i>hostName</i>,
+      <i>httpPort</i> and/or <i>httpsPort</i> attributes could be 
specified.</p>
+  <p>
+  The optional 'session' element makes the endpoint a session affinity based
+      load balancing endpoint. If it is specified, sessions are bound to
+      endpoints in the first message and all successive messages for those
+      sessions are directed to their associated endpoints. Currently there are 
two types
+      of sessions supported in SAL endpoints. Namely HTTP transport based 
session
+      which identifies the sessions based on http cookies and the client 
session which
+      identifies the session by looking at a SOAP header sent by the client 
with the QName
+      '{http://ws.apache.org/ns/synapse}ClientID'. The 'failover' attribute 
mentioned above
+      is not applicable for session affinity based endpoints and it is always
+      considered as set to false. If it is required to have failover behavior 
in session
+      affinity based load balance endpoints, list failover endpoints as the 
target endpoints.
+  </p>
+
+<h4>Load balance endpoint configuration</h4>    
+<pre xml:space="preserve">
+&lt;session type="http|simpleClientSession"/&gt;?
+&lt;loadBalance [policy="roundRobin"] [algorithm="impl of 
org.apache.synapse.endpoints.algorithms.LoadbalanceAlgorithm"]
+        [failover="true|false"]&gt;
+    &lt;endpoint .../&gt;+
+    &lt;member hostName="host" [httpPort="port"] [httpsPort="port2"]&gt;+
+&lt;/loadBalance&gt;
+</pre>
+
+
+<h3>Failover Endpoint</h3>
+<p>Failover endpoints send messages to the listed endpoints with the following 
failover behavior. At the start, the
+    first listed endpoint is selected as the primary and all other endpoints 
are treated as backups.
+    Incoming messages are always sent only to the primary endpoint. If the 
primary endpoint fails,
+    next active endpoint is selected as the primary and failed endpoint is 
marked as inactive.
+    Thus it sends messages successfully as long as there is at least one 
active endpoint among the listed
+    endpoints.</p>
+
+<h4>Failover endpoint configuration</h4>
+<pre xml:space="preserve">
+&lt;failover&gt;
+    &lt;endpoint .../&gt;+
+&lt;/failover&gt;
+</pre>
+
+<h3>Dynamic Load balance Endpoint</h3>
+<p>A Dynamic Load balanced endpoint distributes the messages (load) arriving 
at it among a application members by
+    evaluating the load balancing policy and any other relevant parameters. 
These application members will be
+    discovered using the membershipHandler class. Generally, this class will 
use a group communication mechanism
+    to discover the application members. The class attribute of the 
membershipHandler element should be an
+    implementation of   org.apache.synapse.core.LoadBalanceMembershipHandler. 
membershipHandler specific properties
+    can be specified using the property elements. The policy attribute of the 
dynamicLoadbalance element specifies
+    the load balance policy (algorithm) to be used for selecting the next 
member to which the message has to be
+    forwaded to. Currently only the roundRobin policy is supported. The 
failover attribute determines if the next
+    member should be selected once the currently selected member has failed, 
and defaults to true.</p>
+<h4>Dynamic Load balance endpoint configuration</h4>
+<pre xml:space="preserve">
+&lt;dynamicLoadBalance [policy="roundRobin"] [failover="true|false"]&gt;
+    &lt;membershipHandler
+        class="impl of 
org.apache.synapse.core.LoadBalanceMembershipHandler"&gt;
+        &lt;property name="name" value="value"/&gt;
+    &lt;/membershipHandler&gt;
+&lt;/dynamicLoadBalance&gt;    
+</pre>
+
+
+
+</body>
+</html>
\ No newline at end of file

_______________________________________________
Esb-java-dev mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev

Reply via email to