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 "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2008/10/23 09:02:44 UTC

[jira] Created: (SANDESHA2-179) Adding correct message numbers with jdbc storage

Adding correct message numbers with jdbc storage 
-------------------------------------------------

                 Key: SANDESHA2-179
                 URL: https://issues.apache.org/jira/browse/SANDESHA2-179
             Project: Sandesha2
          Issue Type: Bug
            Reporter: Amila Chinthaka Suriarachchi


I ran a 100 message message sequence  using the jdbc storage. The message receiver looks like this,

protected void invokeBusinessLogic(MessageContext messageContext)
            throws AxisFault {
        System.out.println("Got the soap message ==> " + messageContext.getEnvelope().getBody().getFirstElement());
    }

and the client has this code to produce 100 messages.

for (int i = 1; i < 100; i++) {
        serviceClient.fireAndForget(getTestOMElement(i));
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                }
   }

private OMElement getTestOMElement(long number) {
        OMFactory omFactory = OMAbstractFactory.getOMFactory();
        OMNamespace omNamespace = omFactory.createOMNamespace("http://wso2.org/temp1", "ns1");
        OMElement omElement = omFactory.createOMElement("TestElement", omNamespace);
        omElement.setText("org element " + number);
        return omElement;
    }

so I expects a 1 - 100 message sequence as follows on the server side console.

Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 1</ns1:TestElement>
Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 2</ns1:TestElement>
Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 3</ns1:TestElement>

but there were some missing messages in this sequence

Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 14</ns1:TestElement>
Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 17</ns1:TestElement>

However message sequence terminates properly. but server sends acknowledgments only for 96 messsages.

Then I went through each and every message using tcp mon and saw the following.

<wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
            <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
            <wsrm:MessageNumber>15</wsrm:MessageNumber>
         </wsrm:Sequence>
      </soapenv:Header>
      <soapenv:Body>
         <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
      </soapenv:Body>

<wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
            <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
            <wsrm:MessageNumber>15</wsrm:MessageNumber>
         </wsrm:Sequence>
      </soapenv:Header>
      <soapenv:Body>
         <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 16</ns1:TestElement>
      </soapenv:Body>

So the reason is that the message number 15 is repeated in two messages. But this did not happen with the Inmemory mode. Seems to be a transaction handling problem. I am testing with the Derby data base.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SANDESHA2-179) Adding correct message numbers with jdbc storage

Posted by "Andrew Gatford (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDESHA2-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660677#action_12660677 ] 

Andrew Gatford commented on SANDESHA2-179:
------------------------------------------

We can't apply this patch to Sandesha2 as it will have terrible performance impacts.  This patch will near enough make it single threaded through the Sandesha2 core.  Secondly - this doesn't work in a distributed environment where multiple JVMs could be using the same RMS/RMD beans.
The correct fix is to use the Database itself as the locking mechanism.  This means changing the isolation level on the database (I think) so that if there is a write in progress, no other transactions can get the rmsBean/rmdBeans.  All other implementations (that I know of and I do count my own implementation in this) lock the rmsBean inside the storage manager itself (look at InMemoryTransaction and the InMemoryRMSBeanMgr)

> Adding correct message numbers with jdbc storage 
> -------------------------------------------------
>
>                 Key: SANDESHA2-179
>                 URL: https://issues.apache.org/jira/browse/SANDESHA2-179
>             Project: Sandesha2
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>         Attachments: core_patch.txt, patch.txt, patch.txt, persistence_patch.txt
>
>
> I ran a 100 message message sequence  using the jdbc storage. The message receiver looks like this,
> protected void invokeBusinessLogic(MessageContext messageContext)
>             throws AxisFault {
>         System.out.println("Got the soap message ==> " + messageContext.getEnvelope().getBody().getFirstElement());
>     }
> and the client has this code to produce 100 messages.
> for (int i = 1; i < 100; i++) {
>         serviceClient.fireAndForget(getTestOMElement(i));
>                 try {
>                     Thread.sleep(1000);
>                 } catch (InterruptedException e) {
>                 }
>    }
> private OMElement getTestOMElement(long number) {
>         OMFactory omFactory = OMAbstractFactory.getOMFactory();
>         OMNamespace omNamespace = omFactory.createOMNamespace("http://wso2.org/temp1", "ns1");
>         OMElement omElement = omFactory.createOMElement("TestElement", omNamespace);
>         omElement.setText("org element " + number);
>         return omElement;
>     }
> so I expects a 1 - 100 message sequence as follows on the server side console.
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 1</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 2</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 3</ns1:TestElement>
> but there were some missing messages in this sequence
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 14</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 17</ns1:TestElement>
> However message sequence terminates properly. but server sends acknowledgments only for 96 messsages.
> Then I went through each and every message using tcp mon and saw the following.
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
>       </soapenv:Body>
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 16</ns1:TestElement>
>       </soapenv:Body>
> So the reason is that the message number 15 is repeated in two messages. But this did not happen with the Inmemory mode. Seems to be a transaction handling problem. I am testing with the Derby data base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (SANDESHA2-179) Adding correct message numbers with jdbc storage

Posted by "Damitha Kumarage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDESHA2-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damitha Kumarage updated SANDESHA2-179:
---------------------------------------

    Attachment: patch.txt

Hi Amila,
As I understand the reason for missing messages could be described as follows(specific case why message number 16 missing)

1. Application message processors processOutMessage() is called by application client in the process of sending message body marked as element 15 as message number 15.

2. In application message processor rmsBean with next message number 15 is retrieved calling rmsBeanMgr.retrieve(). Then after doing changes and marking the next message number as the message number 16  it is updated to the data base using rmsBeanMgr.update().

3. At another place of code rmsBean is retrieved before the above update(Say within acknowledement message processor). So this rmsBean also has message number as 15. after doing some changes(here next message number is not increased) it also update to the database calling rmsBeanMgr.update(). Note that if this update happen after the first update then in the database the next message number become 15 again(which cause the problem in hand).

4. Now when again rmsBean is retrieved at application message processor within the process of sending element 16, still it is message number 15 which would result in not sending a message with message number marked as 16.

So my understanding is, to avoid this problem we should lock the rmsBeanMgr object for the duration from retrieve to update. This is possible since rmsBeanMgr is stored in storage manager which in turn has only one instance stored as a parameter in the configuration context.

The patch attached do this on revision r707102 which is just after persistence patch was applied(prier to your solution for the problem in hand). Please try this patch on the revision mentioned and see whether it solve the problem.

> Adding correct message numbers with jdbc storage 
> -------------------------------------------------
>
>                 Key: SANDESHA2-179
>                 URL: https://issues.apache.org/jira/browse/SANDESHA2-179
>             Project: Sandesha2
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>         Attachments: core_patch.txt, patch.txt, patch.txt, persistence_patch.txt
>
>
> I ran a 100 message message sequence  using the jdbc storage. The message receiver looks like this,
> protected void invokeBusinessLogic(MessageContext messageContext)
>             throws AxisFault {
>         System.out.println("Got the soap message ==> " + messageContext.getEnvelope().getBody().getFirstElement());
>     }
> and the client has this code to produce 100 messages.
> for (int i = 1; i < 100; i++) {
>         serviceClient.fireAndForget(getTestOMElement(i));
>                 try {
>                     Thread.sleep(1000);
>                 } catch (InterruptedException e) {
>                 }
>    }
> private OMElement getTestOMElement(long number) {
>         OMFactory omFactory = OMAbstractFactory.getOMFactory();
>         OMNamespace omNamespace = omFactory.createOMNamespace("http://wso2.org/temp1", "ns1");
>         OMElement omElement = omFactory.createOMElement("TestElement", omNamespace);
>         omElement.setText("org element " + number);
>         return omElement;
>     }
> so I expects a 1 - 100 message sequence as follows on the server side console.
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 1</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 2</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 3</ns1:TestElement>
> but there were some missing messages in this sequence
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 14</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 17</ns1:TestElement>
> However message sequence terminates properly. but server sends acknowledgments only for 96 messsages.
> Then I went through each and every message using tcp mon and saw the following.
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
>       </soapenv:Body>
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 16</ns1:TestElement>
>       </soapenv:Body>
> So the reason is that the message number 15 is repeated in two messages. But this did not happen with the Inmemory mode. Seems to be a transaction handling problem. I am testing with the Derby data base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (SANDESHA2-179) Adding correct message numbers with jdbc storage

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDESHA2-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi updated SANDESHA2-179:
---------------------------------------------------

    Attachment: patch.txt

this patch solves the problem for some extend. but still getting dead locks.

I think this problem can be solved by making an order of which all transactions access the data base table resources.

> Adding correct message numbers with jdbc storage 
> -------------------------------------------------
>
>                 Key: SANDESHA2-179
>                 URL: https://issues.apache.org/jira/browse/SANDESHA2-179
>             Project: Sandesha2
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>         Attachments: patch.txt
>
>
> I ran a 100 message message sequence  using the jdbc storage. The message receiver looks like this,
> protected void invokeBusinessLogic(MessageContext messageContext)
>             throws AxisFault {
>         System.out.println("Got the soap message ==> " + messageContext.getEnvelope().getBody().getFirstElement());
>     }
> and the client has this code to produce 100 messages.
> for (int i = 1; i < 100; i++) {
>         serviceClient.fireAndForget(getTestOMElement(i));
>                 try {
>                     Thread.sleep(1000);
>                 } catch (InterruptedException e) {
>                 }
>    }
> private OMElement getTestOMElement(long number) {
>         OMFactory omFactory = OMAbstractFactory.getOMFactory();
>         OMNamespace omNamespace = omFactory.createOMNamespace("http://wso2.org/temp1", "ns1");
>         OMElement omElement = omFactory.createOMElement("TestElement", omNamespace);
>         omElement.setText("org element " + number);
>         return omElement;
>     }
> so I expects a 1 - 100 message sequence as follows on the server side console.
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 1</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 2</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 3</ns1:TestElement>
> but there were some missing messages in this sequence
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 14</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 17</ns1:TestElement>
> However message sequence terminates properly. but server sends acknowledgments only for 96 messsages.
> Then I went through each and every message using tcp mon and saw the following.
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
>       </soapenv:Body>
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 16</ns1:TestElement>
>       </soapenv:Body>
> So the reason is that the message number 15 is repeated in two messages. But this did not happen with the Inmemory mode. Seems to be a transaction handling problem. I am testing with the Derby data base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (SANDESHA2-179) Adding correct message numbers with jdbc storage

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDESHA2-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi updated SANDESHA2-179:
---------------------------------------------------

    Attachment: core_patch.txt

this makes the Acknowlegment processor to get the locks in the same order as others.

> Adding correct message numbers with jdbc storage 
> -------------------------------------------------
>
>                 Key: SANDESHA2-179
>                 URL: https://issues.apache.org/jira/browse/SANDESHA2-179
>             Project: Sandesha2
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>         Attachments: core_patch.txt, patch.txt
>
>
> I ran a 100 message message sequence  using the jdbc storage. The message receiver looks like this,
> protected void invokeBusinessLogic(MessageContext messageContext)
>             throws AxisFault {
>         System.out.println("Got the soap message ==> " + messageContext.getEnvelope().getBody().getFirstElement());
>     }
> and the client has this code to produce 100 messages.
> for (int i = 1; i < 100; i++) {
>         serviceClient.fireAndForget(getTestOMElement(i));
>                 try {
>                     Thread.sleep(1000);
>                 } catch (InterruptedException e) {
>                 }
>    }
> private OMElement getTestOMElement(long number) {
>         OMFactory omFactory = OMAbstractFactory.getOMFactory();
>         OMNamespace omNamespace = omFactory.createOMNamespace("http://wso2.org/temp1", "ns1");
>         OMElement omElement = omFactory.createOMElement("TestElement", omNamespace);
>         omElement.setText("org element " + number);
>         return omElement;
>     }
> so I expects a 1 - 100 message sequence as follows on the server side console.
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 1</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 2</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 3</ns1:TestElement>
> but there were some missing messages in this sequence
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 14</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 17</ns1:TestElement>
> However message sequence terminates properly. but server sends acknowledgments only for 96 messsages.
> Then I went through each and every message using tcp mon and saw the following.
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
>       </soapenv:Body>
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 16</ns1:TestElement>
>       </soapenv:Body>
> So the reason is that the message number 15 is repeated in two messages. But this did not happen with the Inmemory mode. Seems to be a transaction handling problem. I am testing with the Derby data base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SANDESHA2-179) Adding correct message numbers with jdbc storage

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANDESHA2-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642121#action_12642121 ] 

Amila Chinthaka Suriarachchi commented on SANDESHA2-179:
--------------------------------------------------------

this seems to be some thing related to Transaction Isolation level.
By default it set to 2. i.e TRANSACTION_READ_COMMITTED

when I set the transaction level to TRANSACTION_SERIALIZABLE as follows,

dbConnection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);

then message sequences works fine. But after some time system stuck at the client side. i.e I assume there is a deadlock. This may happen if application message processor and sequence message processor does not access the database tables in a same order.

I'll try to check for that.

> Adding correct message numbers with jdbc storage 
> -------------------------------------------------
>
>                 Key: SANDESHA2-179
>                 URL: https://issues.apache.org/jira/browse/SANDESHA2-179
>             Project: Sandesha2
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>
> I ran a 100 message message sequence  using the jdbc storage. The message receiver looks like this,
> protected void invokeBusinessLogic(MessageContext messageContext)
>             throws AxisFault {
>         System.out.println("Got the soap message ==> " + messageContext.getEnvelope().getBody().getFirstElement());
>     }
> and the client has this code to produce 100 messages.
> for (int i = 1; i < 100; i++) {
>         serviceClient.fireAndForget(getTestOMElement(i));
>                 try {
>                     Thread.sleep(1000);
>                 } catch (InterruptedException e) {
>                 }
>    }
> private OMElement getTestOMElement(long number) {
>         OMFactory omFactory = OMAbstractFactory.getOMFactory();
>         OMNamespace omNamespace = omFactory.createOMNamespace("http://wso2.org/temp1", "ns1");
>         OMElement omElement = omFactory.createOMElement("TestElement", omNamespace);
>         omElement.setText("org element " + number);
>         return omElement;
>     }
> so I expects a 1 - 100 message sequence as follows on the server side console.
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 1</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 2</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 3</ns1:TestElement>
> but there were some missing messages in this sequence
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 14</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 17</ns1:TestElement>
> However message sequence terminates properly. but server sends acknowledgments only for 96 messsages.
> Then I went through each and every message using tcp mon and saw the following.
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
>       </soapenv:Body>
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 16</ns1:TestElement>
>       </soapenv:Body>
> So the reason is that the message number 15 is repeated in two messages. But this did not happen with the Inmemory mode. Seems to be a transaction handling problem. I am testing with the Derby data base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (SANDESHA2-179) Adding correct message numbers with jdbc storage

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANDESHA2-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi updated SANDESHA2-179:
---------------------------------------------------

    Attachment: persistence_patch.txt

set the transactions to isolated level and set the statements to concurrency level to stop synchronization issues.

these two patches fix the problem.

> Adding correct message numbers with jdbc storage 
> -------------------------------------------------
>
>                 Key: SANDESHA2-179
>                 URL: https://issues.apache.org/jira/browse/SANDESHA2-179
>             Project: Sandesha2
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>         Attachments: core_patch.txt, patch.txt, persistence_patch.txt
>
>
> I ran a 100 message message sequence  using the jdbc storage. The message receiver looks like this,
> protected void invokeBusinessLogic(MessageContext messageContext)
>             throws AxisFault {
>         System.out.println("Got the soap message ==> " + messageContext.getEnvelope().getBody().getFirstElement());
>     }
> and the client has this code to produce 100 messages.
> for (int i = 1; i < 100; i++) {
>         serviceClient.fireAndForget(getTestOMElement(i));
>                 try {
>                     Thread.sleep(1000);
>                 } catch (InterruptedException e) {
>                 }
>    }
> private OMElement getTestOMElement(long number) {
>         OMFactory omFactory = OMAbstractFactory.getOMFactory();
>         OMNamespace omNamespace = omFactory.createOMNamespace("http://wso2.org/temp1", "ns1");
>         OMElement omElement = omFactory.createOMElement("TestElement", omNamespace);
>         omElement.setText("org element " + number);
>         return omElement;
>     }
> so I expects a 1 - 100 message sequence as follows on the server side console.
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 1</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 2</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 3</ns1:TestElement>
> but there were some missing messages in this sequence
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 14</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
> Got the soap message ==> <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 17</ns1:TestElement>
> However message sequence terminates properly. but server sends acknowledgments only for 96 messsages.
> Then I went through each and every message using tcp mon and saw the following.
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 15</ns1:TestElement>
>       </soapenv:Body>
> <wsrm:Sequence xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" soapenv:mustUnderstand="1">
>             <wsrm:Identifier>urn:uuid:63C7D88DAE5A969F4C1224742882720</wsrm:Identifier>
>             <wsrm:MessageNumber>15</wsrm:MessageNumber>
>          </wsrm:Sequence>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:TestElement xmlns:ns1="http://wso2.org/temp1">org element 16</ns1:TestElement>
>       </soapenv:Body>
> So the reason is that the message number 15 is repeated in two messages. But this did not happen with the Inmemory mode. Seems to be a transaction handling problem. I am testing with the Derby data base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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