Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
I ran a 100 message message sequence using the jdbc storage. The message receiver looks like this,
protected void invokeBusinessLogic(MessageContext messageContext)
throws AxisFault
and the client has this code to produce 100 messages.
for (int i = 1; i < 100; i++) {
serviceClient.fireAndForget(getTestOMElement);
try
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.