You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by ch...@apache.org on 2006/06/15 07:51:24 UTC

svn commit: r414476 [14/15] - in /webservices/sandesha/trunk: ./ c/ config/ interop/ java/ java/config/ java/interop/ java/interop/conf/ java/interop/src/ java/interop/src/org/ java/interop/src/org/apache/ java/interop/src/org/apache/sandesha2/ java/in...

Added: webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java?rev=414476&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java (added)
+++ webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java Wed Jun 14 22:51:15 2006
@@ -0,0 +1,78 @@
+package org.apache.sandesha2.wsrm;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.sandesha2.SandeshaException;
+import org.apache.sandesha2.SandeshaTestCase;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: sanka
+ * Date: Oct 6, 2005
+ * Time: 10:39:03 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class CreateSequenceTest extends SandeshaTestCase {
+
+	SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+	String rmNamespaceValue = Sandesha2Constants.SPEC_2005_02.NS_URI;
+	String addressingNamespaceValue = AddressingConstants.Final.WSA_NAMESPACE;
+	
+    public CreateSequenceTest() {
+        super("CreateSequenceTest");
+    }
+
+    public void testfromOMElement()  throws SandeshaException {
+        CreateSequence createSequence = new CreateSequence(factory,rmNamespaceValue,addressingNamespaceValue);
+        createSequence.fromOMElement(getSOAPEnvelope("", "CreateSequence.xml").getBody());
+
+        AcksTo acksTo = createSequence.getAcksTo();
+        Address address = acksTo.getAddress();
+        assertEquals("http://127.0.0.1:9090/axis/services/RMService", address.getEpr().getAddress());
+
+        SequenceOffer offer = createSequence.getSequenceOffer();
+        Identifier identifier = offer.getIdentifer();
+        assertEquals("uuid:c3671020-15e0-11da-9b3b-f0439d4867bd", identifier.getIdentifier());
+
+    }
+
+    public void testToSOAPEnvelope()  throws SandeshaException {
+        CreateSequence createSequence = new CreateSequence(factory,rmNamespaceValue,addressingNamespaceValue);
+
+        AcksTo acksTo = new AcksTo(factory,rmNamespaceValue,addressingNamespaceValue);
+        Address address = new Address(factory,addressingNamespaceValue);
+        address.setEpr(new EndpointReference("http://127.0.0.1:9090/axis/services/RMService"));
+        acksTo.setAddress(address);
+        createSequence.setAcksTo(acksTo);
+
+        SequenceOffer sequenceOffer = new SequenceOffer(factory,rmNamespaceValue);
+        Identifier identifier = new Identifier(factory,rmNamespaceValue);
+        identifier.setIndentifer("uuid:c3671020-15e0-11da-9b3b-f0439d4867bd");
+        sequenceOffer.setIdentifier(identifier);
+        createSequence.setSequenceOffer(sequenceOffer);
+
+        SOAPEnvelope envelope = getEmptySOAPEnvelope();
+        createSequence.toSOAPEnvelope(envelope);
+
+        OMElement createSequencePart = envelope.getBody().getFirstChildWithName(new QName(rmNamespaceValue,
+                        Sandesha2Constants.WSRM_COMMON.CREATE_SEQUENCE));
+        OMElement acksToPart = createSequencePart.getFirstChildWithName(new QName(
+        		rmNamespaceValue, Sandesha2Constants.WSRM_COMMON.ACKS_TO));
+		OMElement addressPart = acksToPart.getFirstChildWithName(new QName(
+                addressingNamespaceValue, Sandesha2Constants.WSA.ADDRESS));
+        assertEquals("http://127.0.0.1:9090/axis/services/RMService", addressPart.getText());
+
+        OMElement offerPart = createSequencePart.getFirstChildWithName(
+                new QName(rmNamespaceValue, Sandesha2Constants.WSRM_COMMON.SEQUENCE_OFFER));
+        OMElement identifierPart = offerPart.getFirstChildWithName(
+                new QName(rmNamespaceValue, Sandesha2Constants.WSRM_COMMON.IDENTIFIER));
+        assertEquals("uuid:c3671020-15e0-11da-9b3b-f0439d4867bd", identifierPart.getText());
+    }
+}

Added: webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/SequenceAcknowledgementTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/SequenceAcknowledgementTest.java?rev=414476&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/SequenceAcknowledgementTest.java (added)
+++ webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/SequenceAcknowledgementTest.java Wed Jun 14 22:51:15 2006
@@ -0,0 +1,86 @@
+package org.apache.sandesha2.wsrm;
+
+import org.apache.sandesha2.SandeshaException;
+import org.apache.sandesha2.SandeshaTestCase;
+import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: sanka
+ * Date: Oct 7, 2005
+ * Time: 3:52:12 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class SequenceAcknowledgementTest extends SandeshaTestCase {
+
+	SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+	String rmNamespace = Sandesha2Constants.SPEC_2005_02.NS_URI;
+	
+    public SequenceAcknowledgementTest() {
+        super("SequenceAcknowledgementTest");
+    }
+
+    public void testFromOMElement()  throws SandeshaException {
+        SequenceAcknowledgement sequenceAck = new SequenceAcknowledgement(factory,rmNamespace);
+        SOAPEnvelope env = getSOAPEnvelope("", "SequenceAcknowledgement.xml");
+        sequenceAck.fromOMElement(env.getHeader());
+
+        Identifier identifier = sequenceAck.getIdentifier();
+        assertEquals("uuid:897ee740-1624-11da-a28e-b3b9c4e71445", identifier.getIdentifier());
+
+        Iterator iterator = sequenceAck.getAcknowledgementRanges().iterator();
+        while (iterator.hasNext()) {
+            AcknowledgementRange ackRange = (AcknowledgementRange) iterator.next();
+            if (ackRange.getLowerValue() == 1){
+                assertEquals(2, ackRange.getUpperValue());
+
+            } else if (ackRange.getLowerValue() == 4) {
+                assertEquals(6, ackRange.getUpperValue());
+
+            } else if (ackRange.getLowerValue() == 8) {
+                assertEquals(10, ackRange.getUpperValue());
+            }
+        }
+
+        iterator = sequenceAck.getNackList().iterator();
+        while (iterator.hasNext()) {
+            Nack nack = (Nack) iterator.next();
+            if (nack.getNackNumber() == 3) {
+
+            } else if (nack.getNackNumber() == 7) {
+
+            } else {
+                fail("invalid nack : " +  nack.getNackNumber());
+            }
+        }
+
+
+    }
+
+    public void testToOMElement()  throws SandeshaException {
+        SequenceAcknowledgement seqAck = new SequenceAcknowledgement(factory,rmNamespace);
+        Identifier identifier = new Identifier(factory,rmNamespace);
+        identifier.setIndentifer("uuid:897ee740-1624-11da-a28e-b3b9c4e71445");
+        seqAck.setIdentifier(identifier);
+
+        SOAPEnvelope env = getEmptySOAPEnvelope();
+        seqAck.toSOAPEnvelope(env);
+
+        OMElement sequenceAckPart = env.getHeader().getFirstChildWithName(
+                new QName(rmNamespace, Sandesha2Constants.WSRM_COMMON.SEQUENCE_ACK));
+        OMElement identifierPart = sequenceAckPart.getFirstChildWithName(
+                new QName(rmNamespace, Sandesha2Constants.WSRM_COMMON.IDENTIFIER));
+        assertEquals("uuid:897ee740-1624-11da-a28e-b3b9c4e71445", identifierPart.getText());
+
+
+
+
+    }
+}

Added: webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/SequenceTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/SequenceTest.java?rev=414476&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/SequenceTest.java (added)
+++ webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/SequenceTest.java Wed Jun 14 22:51:15 2006
@@ -0,0 +1,66 @@
+package org.apache.sandesha2.wsrm;
+
+import org.apache.sandesha2.SandeshaException;
+import org.apache.sandesha2.SandeshaTestCase;
+import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: sanka
+ * Date: Oct 7, 2005
+ * Time: 4:31:54 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class SequenceTest extends SandeshaTestCase {
+
+	SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+	String rmNamespace = Sandesha2Constants.SPEC_2005_02.NS_URI;
+	
+    public SequenceTest() {
+        super("SequenceTest");
+
+    }
+
+    public void testFromOMElement()  throws SandeshaException {
+        SOAPEnvelope env = getSOAPEnvelope("", "Sequence.xml");
+        Sequence sequence = new Sequence(factory,rmNamespace);
+        sequence.fromOMElement(env.getHeader());
+
+        Identifier identifier = sequence.getIdentifier();
+        assertEquals("uuid:879da420-1624-11da-bed9-84d13db13902", identifier.getIdentifier());
+
+        MessageNumber msgNo = sequence.getMessageNumber();
+        assertEquals(1, msgNo.getMessageNumber());
+    }
+
+    public void testToSOAPEnvelope()  throws SandeshaException {
+        Sequence sequence = new Sequence(factory,rmNamespace);
+
+        Identifier identifier = new Identifier(factory,rmNamespace);
+        identifier.setIndentifer("uuid:879da420-1624-11da-bed9-84d13db13902");
+        sequence.setIdentifier(identifier);
+
+        MessageNumber msgNo = new MessageNumber(factory,rmNamespace);
+        msgNo.setMessageNumber(1);
+        sequence.setMessageNumber(msgNo);
+
+        SOAPEnvelope envelope = getEmptySOAPEnvelope();
+        sequence.toSOAPEnvelope(envelope);
+
+        OMElement sequencePart = envelope.getHeader().getFirstChildWithName(
+                new QName(rmNamespace, Sandesha2Constants.WSRM_COMMON.SEQUENCE));
+        OMElement identifierPart = sequencePart.getFirstChildWithName(
+                new QName(rmNamespace, Sandesha2Constants.WSRM_COMMON.IDENTIFIER));
+        assertEquals("uuid:879da420-1624-11da-bed9-84d13db13902", identifierPart.getText());
+
+        OMElement msgNumberPart = sequencePart.getFirstChildWithName(
+				new QName (rmNamespace,Sandesha2Constants.WSRM_COMMON.MSG_NUMBER));
+        assertEquals(1, Long.parseLong(msgNumberPart.getText()));
+    }
+}

Added: webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/TerminateSequenceResponseTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/TerminateSequenceResponseTest.java?rev=414476&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/TerminateSequenceResponseTest.java (added)
+++ webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/TerminateSequenceResponseTest.java Wed Jun 14 22:51:15 2006
@@ -0,0 +1,27 @@
+package org.apache.sandesha2.wsrm;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.sandesha2.SandeshaException;
+
+import junit.framework.TestCase;
+
+public class TerminateSequenceResponseTest extends TestCase {
+
+	SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+	String rmNamespaceValue = Sandesha2Constants.SPEC_2005_02.NS_URI;
+	String addressingNamespaceValue = AddressingConstants.Final.WSA_NAMESPACE;
+	
+    public TerminateSequenceResponseTest() {
+//        super("CreateSequenceResponseTest");
+
+    }
+
+    public void testFromOMElement() throws SandeshaException {
+    	
+    }
+
+    public void testToSOAPEnvelope()  throws SandeshaException {}
+}

Added: webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/TerminateSequenceTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/TerminateSequenceTest.java?rev=414476&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/TerminateSequenceTest.java (added)
+++ webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/TerminateSequenceTest.java Wed Jun 14 22:51:15 2006
@@ -0,0 +1,53 @@
+package org.apache.sandesha2.wsrm;
+
+import org.apache.sandesha2.SandeshaException;
+import org.apache.sandesha2.SandeshaTestCase;
+import org.apache.sandesha2.Sandesha2Constants;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: sanka
+ * Date: Oct 7, 2005
+ * Time: 3:36:59 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class TerminateSequenceTest extends SandeshaTestCase {
+
+	SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+	String rmNamespace = Sandesha2Constants.SPEC_2005_02.NS_URI;
+	
+    public TerminateSequenceTest() {
+        super("TerminateSequenceTest");
+    }
+
+    public void testFromOMElement() throws SandeshaException {
+        TerminateSequence terminateSequence =  new TerminateSequence(factory,rmNamespace);
+        SOAPEnvelope env = getSOAPEnvelope("", "TerminateSequence.xml");
+        terminateSequence.fromOMElement(env.getBody());
+
+        Identifier identifier = terminateSequence.getIdentifier();
+        assertEquals("uuid:59b0c910-1625-11da-bdfc-b09ed76a1f06", identifier.getIdentifier());
+    }
+
+    public void testToSOAPEnvelope() throws SandeshaException {
+        TerminateSequence terminateSequence = new TerminateSequence(factory,rmNamespace);
+        Identifier identifier = new Identifier(factory,rmNamespace);
+        identifier.setIndentifer("uuid:59b0c910-1625-11da-bdfc-b09ed76a1f06");
+        terminateSequence.setIdentifier(identifier);
+
+        SOAPEnvelope env = getEmptySOAPEnvelope();
+        terminateSequence.toSOAPEnvelope(env);
+
+        OMElement terminateSeqPart = env.getBody().getFirstChildWithName(
+                new QName(rmNamespace, Sandesha2Constants.WSRM_COMMON.TERMINATE_SEQUENCE));
+        OMElement identifierPart = terminateSeqPart.getFirstChildWithName(
+                new QName(rmNamespace, Sandesha2Constants.WSRM_COMMON.IDENTIFIER));
+        assertEquals("uuid:59b0c910-1625-11da-bdfc-b09ed76a1f06", identifierPart.getText());
+    }
+}

Added: webservices/sandesha/trunk/java/xdocs/architectureGuide.html
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/xdocs/architectureGuide.html?rev=414476&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/xdocs/architectureGuide.html (added)
+++ webservices/sandesha/trunk/java/xdocs/architectureGuide.html Wed Jun 14 22:51:15 2006
@@ -0,0 +1,365 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+  <title>Sandesha2 Architecture guide</title>
+  <meta name="generator" content="amaya 9.2.1, see http://www.w3.org/Amaya/"
+  />
+</head>
+
+<body xml:lang="en" lang="en">
+<h1>Apache Sandesha2 Architecture Guide</h1>
+
+<h2>Content</h2>
+<ul>
+  <li><a href="#intro">Introduction</a></li>
+  <li><a href="#architecture">Architecture</a></li>
+  <ul>
+      <li><a href="#hnd">Handlers</a>
+        <ul>
+          <li><a href="#in">SandeshaInHandler</a></li>
+          <li><a href="#out">SandeshaOutHandler</a></li>
+          <li><a href="#globalin">SandeshaGlobalInHandler</a></li>
+        </ul>
+      </li>
+      <li><a href="#sender">Sender</a></li>
+      <li><a href="#mp">Message Processors</a></li>
+      <li><a href="#ioi">InOrderInvoker</a></li>
+      <li><a href="#sf">Storage Framework</a></li>
+    </ul>
+  <li><a href="#da">Delivery Assurances</a></li>
+  <li><a href="#es">Example Scenarios</a>
+    <ul>
+      <li><a href="#cs">Client Side</a></li>
+      <li><a href="#ss">Server Side</a></li>
+    </ul>
+  </li>
+</ul>
+<a name="intro"></a>
+
+<h2>Introduction</h2>
+
+<p>Sandesha2 gives reliable messaging capabilities to Axis2. From the point
+of view of the Axis2 engine, Sandesha2 is a module. When this module is
+engaged to a service, clients have the option of invoking it in a reliable
+manner. In the client side Sandesha2 module can be used to interact with
+existing reliable Web services.</p>
+
+<p>According to the Web service-ReliableMessaging (WS-RM) specification which
+is implemented by Sandesha2, reliable communication happens between two
+endpoints. These endpoints are called the RM Source (RMS) and the RM
+Destination (RMD). Before communication, RMS and RMD perform a message
+exchange to create a relationship called a Sequence between them. A sequence
+is always identified by a unique Sequence Identifier.</p>
+
+<p>Each message of a sequence is numbered, starting from one. In Sandesha2
+the maximum number of messages a sequence can support is 2 <sup>64</sup>
+(size of <em>long</em> data type). Of course practically this may be limited
+by the memory available for your system . The message number is used by the
+destination to support additional delivery assurances. This will be explained
+later in this tutorial.</p>
+
+<p>The reliability is obtained basically using acknowledgements. RMS is
+required to send each message one or more times to the RMD. RMD sends back
+acknowledgements to notify the successful reception of messages. After
+receiving an acknowledgement for a certain message RMS can stop the
+retransmission of that message.</p>
+
+<p>When all messages of a certain sequence have been successfully transmitted
+to RMD, RMS sends a TerminateSequence message. If RMD receives this message
+it can free any resources allocated for this sequence. Otherwise resource
+de-allocation will happen based on a timeout.</p>
+
+<p><strong>Following diagram explains operation of the RMS and the
+RMD</strong>.</p>
+
+<p><img alt="WS-RM Model" src="images/RMModel.jpg" /></p>
+<a>Sandesha2 supports two reliable messaging specifications. It fully
+supports WS-ReliableMessaging February 2005 specification which was created
+by collaborative efforts of several companies. Later this specification was
+submitted to OASIS and currently being standardized under the OASIS WS-RX
+technical committee. Sandesha2 supports up to the revision CD 3 of the
+specification being developed under this technical committee.</a> <a
+name="architecture"></a>
+
+<h2>Architecture</h2>
+
+<p><img alt="Architecture" src="images/architecture.jpg" /></p>
+
+<p></p>
+
+<p>Sandesha2 components are used in a completely symmetric manner, in the
+server side and client as shown in the diagram above. Lets just consider a
+single side for this discussion.</p>
+<a name="hnd"></a>
+
+<h3>Handlers</h3>
+
+<p>Sandesha2 adds three handlers to the execution chain of Axis2. Two of
+these handlers are added to a special user phase called 'RMPhase' of in and
+out flows. The other handler is added to the predispatch phase of the inFlow.
+These handlers and their functions are given below.</p>
+<p><img alt="Storage" src="images/handlers.jpg" /></p>
+
+<a name="in"></a>
+
+<h4>SandeshaInHandler</h4>
+
+<p>This is added to the RMPhase of the inFlow. Since RMPhase is a user phase,
+this handler will only be invoked for messages that are aimed at RM enabled
+service. This handler will identify the type of this message. The type can be
+an application message (a message that has to be delivered to the service) or
+a RM control message. Sandesha2 has a special set of classes called message
+processors which are capable of processing each type of message. Depending on
+the type, the message is send through the 'processInMessage' method of the
+message processor which will do the further processing of it.</p>
+<a name="out"></a>
+
+<h4>SandeshaOutHandler</h4>
+
+<p>This handler is responsible for doing the basic outFlow processing. This
+will first generate an ID called the Internal Sequence ID which is used to
+identify the sequence this message should belongs to. All the messages having
+the same Internal Sequence ID will be sent within a single sequence. An
+Internal Sequence ID will have a corresponding Sequence ID which would be
+obtained after the Create Sequence message exchange. In the client side the
+Internal Sequence ID is the combination of the wsa:To address and a special
+value given by the client called Sequence Key. In the server side the
+Internal Sequence ID is a derivation of the Sequence ID value of the messages
+of the incoming sequence.</p>
+
+<p>Before sending the message through other handlers the SandeshaOutHandler
+will send it through the 'processOutMessage' method of the respective message
+processor.</p>
+<a name="globalin"></a>
+
+<h4>SandeshaGlobalInHandler</h4>
+
+<p>This handler is added to the predispatch phase of the inFlow. Since this
+is a global phase, this handler will be called for each and every message
+that comes to the Axis2 system. To maximize performance, the very first
+function of this handler is to identify whether the current message can be
+processed by it. It checks whether the message is intended for a RM enabled
+service, and if so, check the message type to further verify whether it
+should be processed globally. This handler was placed to perform functions
+that should be done before the instance dispatching level of Axis2.</p>
+
+<p><strong>Some of these functions are given below:</strong></p>
+<ul>
+  <li>Detecting duplicate messages and dropping them.</li>
+  <li>Detecting faults that occur due to RM control messages and reporting
+    them.</li>
+  <li>Answering to acknowledgement requests of the dropped application
+    messages.</li>
+</ul>
+<a name="sender"></a>
+
+<h3>Sender</h3>
+
+<p>Sender is responsible for transmission and retransmission of messages. The
+Sender is a separate thread that keeps running all the time. At each
+iteration Sender checks whether there is any messages to be sent. If there is
+any, it is sent to the destination. Sender also identifies messages that has
+to be retransmitted and keep re-sending them until a maximum limit decided by
+<a href="userGuide.html#cs" target="_blank">Sandesha2 policies</a> is exceeded.</p>
+<a name="mp"></a>
+
+<h3>Message Processors</h3>
+
+<p>Sandesha2 have a set of classes called message processors, each
+implementing the MessageProcessor interface. Each message processor is
+responsible for processing a certain type of message. For example,
+CreateSequenceProcessor will process CreateSequence messages and
+AcknowledgementProcessor will process Acknowledgement messages. The message
+processor interface defines two methods for processing incoming messages and
+outgoing messages. (namely 'processInMessage' and 'processOutMessage')</p>
+<a name="ioi"></a>
+
+<h3>InOrderInvoker</h3>
+
+<p>InOrderInvoker is another separate thread that is started by the Sandesha2
+system. This is started only if Sadesha2 has been configured to support
+in-order delivery assurance. InOrderInvoker makes sure that it invokes
+messages of a sequence only in the order of message numbers.</p>
+<a name="sf"></a>
+
+<h3>Storage Framework</h3>
+
+<p>Sandesha2 storage framework is one of the most important parts of the
+Sandesha2 system. This was designed to support the RM message exchange while
+being independent of the storage implementation used. The storage framework
+defines a set of interfaces and abstract classes that can be implemented by a
+particular storage implementation. Sandesha2 system comes with an in-memory
+storage implementation. There can be other implementations based on different
+databases and persistence mechanisms.</p>
+
+<p><strong>Following diagram gives a brief view of the Sandesha2 storage
+framework.</strong></p>
+
+<p><img alt="Storage" src="images/storage.jpg" /></p>
+<a name="RMbeans"></a>
+
+<p>Storage framework defines several beans that extend the RMBean abstract
+class. They are given below:</p>
+<ol>
+  <li>CreateSequenceBean (fields - InternalSequenceID, CreateSequenceMsgID,
+    SequenceID)</li>
+  <li>SenderBean (fields - messageContextRefKey, internalSequenceID,
+    messageNumber, messageID, messageType, send, resent,
+  sentCount,timeToSend)</li>
+  <li>NextMsgBean (fields - sequenceID, nextMsgToProcess)</li>
+  <li>InvokerBean (fields - invoked,messageContextRefKey, sequenceID,
+  msgNo)</li>
+  <li>SequencePropertyBean (fields - sequenceID, name, value)</li>
+</ol>
+
+<p>There are five bean manager interfaces corresponding to each of above
+beans.They are as follows:</p>
+<ol>
+  <li>CreateSequenceBeanMgr</li>
+  <li>InvokerBeanMgr</li>
+  <li>NextMsgBeanMgr</li>
+  <li>SenderBeanMgr</li>
+  <li>SequencePropertyBeanMgr</li>
+</ol>
+
+<p>Sandesha2 also defines a StorageManager interface that defines methods to
+create each of these bean managers and to create a Transaction object which
+should implement the Transaction interface. Transaction interface defines
+commit and rollback methods.</p>
+
+<p>Collectively each Sandesha2 storage implementation should have following
+classes:</p>
+<ol>
+  <li>An implementation of the StorageManager interface.</li>
+  <li>Implementations of five Bean Manager interfaces.</li>
+  <li>An implementation of a Transaction interface.</li>
+</ol>
+
+<p>These classes can be packed as a jar archive and added to the classpath.
+The name of the StorageManager implementation class has to be mentioned in
+Sandesha2 policy configurations. This will be picked up after a restart of
+the the Axis2 engine.</p>
+<a name="da"></a>
+
+<h2>Delivery Assurances</h2>
+
+<p>Sandesha2 can provide an in-order exactly-once delivery assurance. The
+ordering (in-order) is optional. You can disable it using Sandesha2 policy
+configurations. The ordering is done using the <a href="#ioi">InOrderInvoker
+thread</a> that was introduced earlier.</p>
+
+<p><strong>If ordering (in-order) is enabled</strong>, SandeshaInHandler
+pauses the execution of an incoming application message. As a result of this,
+the message will not go through rest of the handler chain in the first
+invocation. Note that it also starts the InOrderInvoker thread if it is
+stopped. This thread goes through the paused messages and resume each of them
+in the order of message numbers.</p>
+
+<p><strong>If in-order invocation is not enabled</strong> the
+SandeshaInHandler will not pause the messages and they will go in their full
+execution path in one go.</p>
+
+<p>The delivery assurance to be used depends on your requirements. If you
+want the invocation to be as fast as possible, and you do not care about
+ordering, disable in order invocation. But if you want message to be invoked
+in the order they were sent by the client, you have to enable it. There could
+be a considerable performance improvements if this feature is disabled.
+Specially if majority of the messages come out of order.</p>
+
+<p>In the current implementation, each message (identified by sequenceID and
+message number) will be invoked only once. So exactly once delivery assurance
+is guaranteed. You cannot ask Sandesha2 to invoke the same message more than
+once.</p>
+<a name="es"></a>
+<h2>Example Scenario</h2>
+
+<p>This part explains how Sandesha2 framework works internally for the most
+common RM scenario, which is the sending of a couple of Ping messages from a
+client to the server. We will mainly look at how Sandesha2 uses its storage
+to do the RM message exchange correctly. While going through the following,
+keep the <a href="#RMbeans">RM Beans and their fields</a> which were
+mentioned earlier, in mind.</p>
+<a name="cs"></a>
+
+<h3>Client Side</h3>
+<ul>
+  <li>Client does the first fireAndForget method invocation of a
+    serviceClient after setting necessary properties.</li>
+  <li>Message reaches the SandeshaOutHandler which detects it as an
+    application message. The processing is delegated to the processOutMessage
+    method of the Application Message Processor.</li>
+  <li>Application Message Processor generates the Internal Sequence ID as
+    explained earlier. It understands that this is a new sequence and
+    generates a Create Sequence Message for it. The Application Message gets
+    paused.</li>
+  <li>SandeshaOutHandler adds an entry to the CreateSequence bean manager
+    representing the newly created Create Sequence message. This entry has
+    three properties.The sequenceID property is initially null. The
+    createSeqMsgID is the message ID of the created CreateSequence message.
+    The internalSequenceID property gets the generated Internal Sequence ID
+    value.</li>
+  <li>SandeshaOutHandler adds two entries to the SenderBeanManager. One which
+    has the send property to 'false' represents the application message,
+    other which has the send property to 'true' represents the CreateSequence
+    message. The Sender thread sends (and retransmits) only the
+    CreateSequence message.</li>
+  <li>After some time the client side would receive a Create Sequence
+    Response message from the server. The SandeshaInHandler delegates the
+    processing to the CreateSequenceResponse message processor. It finds the
+    correct CreateSequence manager entry using the createSequenceMessageID
+    property (which is in the relatesTo entry of the response message).</li>
+  <li>Client updates the sequenceID property of the CreateSequence bean
+    manager entry. Also the send value of the application message entries are
+    set to 'true'. The sender starts transmitting and retransmitting
+    application messages.</li>
+  <li>When the client receives acknowledgements for the messages it send,
+    they are delivered to the Acknowledgement Processor which removes the
+    corresponding application message entries from the Sender bean
+  manager.</li>
+  <li>If an acknowledgement says that all the sent messages (up to last
+    message) was successfully received, the Acknowledgement Processor creates
+    a Terminate Sequence message and adds a corresponding entry to the Sender
+    bean manager.</li>
+</ul>
+<a name="ss"></a>
+
+<h3>Server Side</h3>
+<ul>
+  <li>Server receives a CreateSequence message. It generates a new sequence
+    ID and creates a new Create Sequence Response message containing this
+  ID.</li>
+  <li>Server adds an entry to the NextMessage Bean Manager. The initial value
+    for nextMessageToInvoke property is 1.</li>
+  <li>Server adds an entry to the SenderBeanManager (of server side)
+    representing the application message. The send value is'true'. The
+    CreateSequenceResponse message is sent by the Sender.</li>
+  <li>After some time the server receives an application message. The server
+    side SandeshaInHandler delegates this to the ApplicationMessageProcessor
+    which creates an acknowledgement and sends it. If in-order invocation is
+    enabled, an entry is added to the InvokerBeanManager representing this
+    new application message.
+    <p><em>Lets assume that the message number of this message is 2.</em></p>
+  </li>
+  <li>The InOrderInvoker which keeps looking at the InvokerBeanManager
+    entries sees that there are entries to be invoked.</li>
+  <li>The InOrderInvoker checks the entry of the NextMessageBeanManager of
+    the relevant sequence and sees that it is 1. But since only message
+    number 2 is present in the invokerBeanManager entries, the invocation is
+    not done.</li>
+  <li>After some time, application message 1 also comes. Now the Invoker sees
+    this entry and invokes the message. It also updates the
+    nextMessageToInvoke property of NextMessageBeanManagerto 2. The invoker
+    again checks whether the new entry for the NextMessageToInvoke (2) is
+    present in the InvokerBeanManager entries. Since this is present it is
+    also invoked. The value is again updated (to 3) but no invocation is done
+    since an entry is not found.</li>
+  <li>Some time later the server may receive a TerminateSequence message. It
+    can partly remove the resources allocated for the sequence. The other
+    part of resources (which is required by the InOrderInvoker) is removed
+    after the invocation of the last message.</li>
+</ul>
+</body>
+</html>

Added: webservices/sandesha/trunk/java/xdocs/download.cgi
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/xdocs/download.cgi?rev=414476&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/xdocs/download.cgi (added)
+++ webservices/sandesha/trunk/java/xdocs/download.cgi Wed Jun 14 22:51:15 2006
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Wrapper script around mirrors.cgi script
+# (we must change to that directory in order for python to pick up the
+#  python includes correctly)
+cd /www/www.apache.org/dyn/mirrors
+/www/www.apache.org/dyn/mirrors/mirrors.cgi $*
\ No newline at end of file

Added: webservices/sandesha/trunk/java/xdocs/download.html
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/xdocs/download.html?rev=414476&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/xdocs/download.html (added)
+++ webservices/sandesha/trunk/java/xdocs/download.html Wed Jun 14 22:51:15 2006
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!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>Sandesha2 - Releases</title>
+<head>
+<body class="composite">
+<div align="left">
+<p>Please select the Sandesha2 version you want to download. Latest release is 1.0. You can download both
+the binay distribution and the source distribution.</p>
+</div>
+
+<div align="center">
+<table class="bodyTable"><tbody>
+        <tr class="a">
+            <td width="45" align="center">Name</td>
+            <td width="80" align="center">Type</td>
+            <td width="300" align="center">Distribution</td>
+            <td width="100" align="center">Date</td>
+            <td width="200" align="center">Description</td>
+            <td width="200" align="center">Compatible Axis2 version</td>
+        </tr>
+	  <tr class="c"><td align="center" valign="middle"><a name="10"></a>1.0</td><td align="center">Release</td><td>
+              Source Distribution 
+              <a href="[preferred]/ws/sandesha2/1_0/sandesha2-1.0-src.zip" title="[preferred]/ws/sandesha2/1_0/sandesha2-1.0-src.zip">zip</a>
+              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-src.zip.md5" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-src.zip.md5">MD5</a>
+              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-src.zip.asc" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-src.zip.asc">PGP</a>
+              <br></br>
+              Binary Distribution
+              <a href="[preferred]/ws/sandesha2/1_0/sandesha2-1.0-bin.zip" title="[preferred]/ws/sandesha2/1_0/sandesha2-1.0-bin.zip">zip</a>
+              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-bin.zip.md5" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-bin.zip.md5">MD5</a>
+              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-bin.zip.asc" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-bin.zip.asc">PGP</a>
+              <br></br>        
+            </td><td>05 - 08 - 2006</td>
+            <td>1.0 Release (Mirrored)</td>
+            <td>1.0</td>
+            </tr>
+	  <tr class="b"><td align="center" valign="middle"><a name="09"></a>0.9</td><td align="center">Release</td><td>
+              Source Distribution 
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip" title="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip">zip</a>
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.md5" class="externalLink" title="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.md5">MD5</a>
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.asc" class="externalLink" title="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.asc">PGP</a>
+              <br></br>
+              Binary Distribution
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip" title="[preferred]/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip">zip</a>
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.md5" class="externalLink" title="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.md5">MD5</a>
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.asc" class="externalLink" title="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.asc">PGP</a>
+              <br></br>        
+            </td><td>12 - 05 - 2005</td>
+            <td>0.9 Release (Mirrored)</td>
+            <td>0.93</td>
+     </tr>
+    </tbody></table>
+</div>
+<div align="left">
+<p>[if-any logo] <a href="[link]"><img align="right" src="[logo]" border="0" alt=""></img></a>[end] The currently selected mirror is <b>[preferred]</b>.  If
+you encounter a problem with this mirror, please select another mirror.  If
+all mirrors are failing, there are <i>backup</i> mirrors (at the end of the
+mirrors list) that should be available.</p>
+
+<form action="[location]" method="get" id="SelectMirror">
+  Other mirrors: 
+  <select name="Preferred">[if-any http][for http]
+    <option value="[http]" selected="selected">[http]</option>[end][end][if-any ftp][for ftp]
+    <option value="[ftp]">[ftp]</option>[end][end][if-any backup][for backup]
+    <option value="[backup]">[backup] (backup)</option>[end][end]
+  </select>
+   
+  <input type="submit" value="Change"></input></form>
+
+<p>You may also consult the <a href="http://www.apache.org/mirrors/" class="externalLink" title="External Link">complete
+list of mirrors</a>.</p>
+
+<p><strong>Note:</strong> when downloading from a mirror please check the <a href="http://www.apache.org/dev/release-signing#md5" class="externalLink" title="External Link">md5sum</a> and verify
+the <a href="http://www.apache.org/dev/release-signing#openpgp" class="externalLink" title="External Link">OpenPGP</a>
+compatible signature from the main Apache site. These can be downloaded by
+following the links above. This <a href="http://www.apache.org/dist/ws/sandesha2/KEYS" class="externalLink" title="External Link">KEYS</a> file contains the
+public keys used for signing release. It is recommended that (when possible)
+a <a href="http://www.apache.org/dev/release-signing#web-of-trust" class="externalLink" title="External Link">web of
+trust</a> is used to confirm the identity of these keys.</p>
+</div></div></div></div><div class="clear"><hr></hr></div><div id="footer"><div class="xright">© 2005, Apache Web Services</div><div class="clear"><hr></hr></div></div></body></html>
\ No newline at end of file

Added: webservices/sandesha/trunk/java/xdocs/images/RMModel.jpg
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/xdocs/images/RMModel.jpg?rev=414476&view=auto
==============================================================================
Binary file - no diff available.

Propchange: webservices/sandesha/trunk/java/xdocs/images/RMModel.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: webservices/sandesha/trunk/java/xdocs/images/architecture.jpg
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/xdocs/images/architecture.jpg?rev=414476&view=auto
==============================================================================
Binary file - no diff available.

Propchange: webservices/sandesha/trunk/java/xdocs/images/architecture.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: webservices/sandesha/trunk/java/xdocs/images/handlers.jpg
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/xdocs/images/handlers.jpg?rev=414476&view=auto
==============================================================================
Binary file - no diff available.

Propchange: webservices/sandesha/trunk/java/xdocs/images/handlers.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: webservices/sandesha/trunk/java/xdocs/images/storage.jpg
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/xdocs/images/storage.jpg?rev=414476&view=auto
==============================================================================
Binary file - no diff available.

Propchange: webservices/sandesha/trunk/java/xdocs/images/storage.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: webservices/sandesha/trunk/java/xdocs/index.html
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/xdocs/index.html?rev=414476&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/xdocs/index.html (added)
+++ webservices/sandesha/trunk/java/xdocs/index.html Wed Jun 14 22:51:15 2006
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!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>Welcome to Sandesha2 home page</title>
+  <meta name="generator" content="amaya 9.2.1, see http://www.w3.org/Amaya/"
+  />
+</head>
+
+<body>
+<h1>Welcome to Apache Sandesha2</h1>
+
+<p>Sandesha2 is an implementation of <a
+href="ftp://www6.software.ibm.com/software/developer/library/ws-reliablemessaging200502.pdf" target="_blank">WS-ReliableMessaging
+specification</a> published by IBM, Microsoft, BEA and TIBCO. Sandesha2 was
+built on top of Axis2. Therefore by using Sandesha2 you can add reliable
+messaging capability to the web services hosted using Axis2. Sandesha2 can
+also be used with Axis2 client to interact with already hosted web services
+in a reliable manner. Please see sandesha2 user guide for more information on
+using Sandesha2. Read Sandesha2 Architecture guide to see how Sandesha2 work
+internally.</p>
+
+</body>
+</html>

Added: webservices/sandesha/trunk/java/xdocs/navigation.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/xdocs/navigation.xml?rev=414476&view=auto
==============================================================================
--- webservices/sandesha/trunk/java/xdocs/navigation.xml (added)
+++ webservices/sandesha/trunk/java/xdocs/navigation.xml Wed Jun 14 22:51:15 2006
@@ -0,0 +1,22 @@
+<project name="Sandesha2">
+    <title>Sandesha2</title>
+    <body>
+        <menu name="Apache Sandesha2">
+            <item name="Home" href="index.html" />
+            <item name="Downloads">
+                <item name="Releases" href="download.cgi"/>
+                <item name="Source Code" href="http://svn.apache.org/repos/asf/webservices/sandesha/trunk"/>
+            </item>
+		<item name="Documentation">
+			<item name="User Guide" href="userGuide.html"/>
+ 			<item name="Architecture Guide" href="architectureGuide.html"/>
+  			<item name="Java Docs" href="apidocs/index.html" />
+            </item>
+            <item name="Project Information">
+                <item name="Mailing Lists" href="mail-lists.html"/>
+                <item name="Project Team" href="team-list.html"/>
+            </item>
+        </menu>
+    </body>
+</project>
+



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org