Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 95135 invoked from network); 4 Jan 2011 21:49:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Jan 2011 21:49:08 -0000 Received: (qmail 26733 invoked by uid 500); 4 Jan 2011 21:49:07 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 26613 invoked by uid 500); 4 Jan 2011 21:49:07 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 26605 invoked by uid 99); 4 Jan 2011 21:49:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 21:49:06 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.85.173.253] (HELO server.dankulp.com) (64.85.173.253) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 21:48:59 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id 5EB0A18776E; Tue, 4 Jan 2011 16:48:38 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter-dev@cxf.apache.org.pjXm5eh6VR Received: from dilbert.dankulp.com (c-24-91-72-253.hsd1.ma.comcast.net [24.91.72.253]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id 47B49187768; Tue, 4 Jan 2011 16:48:37 -0500 (EST) From: Daniel Kulp To: dev@cxf.apache.org Subject: Re: WS-ReliableMessaging issues Date: Tue, 4 Jan 2011 16:50:09 -0500 User-Agent: KMail/1.13.5 (Linux/2.6.36; KDE/4.5.4; x86_64; ; ) Cc: Dennis Sosnoski References: <4D22F411.8080804@sosnoski.com> In-Reply-To: <4D22F411.8080804@sosnoski.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201101041650.10390.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-102.9 required=3.0 tests=ALL_TRUSTED,BAYES_00, SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.1 I would need to double check how OneWays and WS-RM are supposed to work in regards to acks and such, but for NORMAL usage with OneWay's, there is no guarantee about the ordering in which your service method is invoked. I'm pretty sure that is what is happening here. Basically, per spec, the "ack" on the one way goes back as soon as the message is received on the server side, PRIOR to being dispatched to the implementation. Depending on the threading and such, the client could then immediately send another message that could potentially get into the implementation before that first request gets there. I think the thing is likely working in that the messages are getting to the server inOrder, but the one-way behavior noted above is then causing the various threads to get into the impl in a different order. If you use syncronous calls, does it all work as expected? Dan On Tuesday 04 January 2011 5:18:57 am Dennis Sosnoski wrote: > I've tried some quick evaluations of the WS-ReliableMessaging support > and ran into some problems. > > Starting with the supplied 2.3.1 ws_rm sample code I first removed the > in the server ws_rm.xml to declutter the output. Then > running the client gives: > > server: > [java] Starting Server > [java] Server ready... > [java] Executing operation greetMeOneWay > > [java] Hello there Chris > [java] Executing operation greetMeOneWay > > [java] Hello there Anne > [java] Executing operation greetMeOneWay > > [java] Hello there Bill > [java] Executing operation greetMeOneWay > > [java] Hello there Daisy > > So far so good. These are out of order (the requests are "Anne", "Bill", > "Chris", and "Daisy", in that order), but since the default delivery > assurance appears to be AtLeastOnce that's ok. > > Next I tried changing the delivery assurance to ExactlyOnce and InOrder > by adding this (deduced from the schemas) to the > element in the server ws_rm.xml: > > > > > > > So now the requests should be received in order on the server, right? Well: > > server: > [java] Starting Server > [java] Server ready... > [java] Executing operation greetMeOneWay > > [java] Hello there Anne > [java] Executing operation greetMeOneWay > > [java] Hello there Chris > [java] Executing operation greetMeOneWay > > [java] Hello there Bill > [java] Executing operation greetMeOneWay > > [java] Hello there Daisy > > Huh. Have I set up the server ws_rm.xml wrong to get the delivery > assurances, or do these just not work correctly? > > Next I tried removing the decoupled endpoint on the client (by removing > the element from the client ws_rm.xml) so that all the > server responses would come back on the same channel: > > server: > [java] Starting Server > [java] Server ready... > [java] Executing operation greetMeOneWay > > [java] Executing operation greetMeOneWay > > [java] Hello there Anne > [java] Hello there Chris > [java] Jan 4, 2011 8:55:03 PM org.apache.cxf.ws.rm.Proxy acknowledge > [java] WARNING: It is not possible to send out-of-band > acknowledgments to the anonymous address. > [java] An acknowledgement will be piggybacked on the next response. > [java] Executing operation greetMeOneWay > > [java] Hello there Anne > [java] Executing operation greetMeOneWay > > [java] Hello there Bill > [java] Executing operation greetMeOneWay > > [java] Hello there Daisy > [java] Jan 4, 2011 8:55:07 PM org.apache.cxf.ws.rm.Proxy acknowledge > [java] WARNING: It is not possible to send out-of-band > acknowledgments to the anonymous address. > [java] An acknowledgement will be piggybacked on the next response. > [java] Executing operation greetMeOneWay > > [java] Hello there Bill > [java] Jan 4, 2011 8:55:11 PM org.apache.cxf.ws.rm.Proxy acknowledge > [java] WARNING: It is not possible to send out-of-band > acknowledgments to the anonymous address. > [java] An acknowledgement will be piggybacked on the next response. > > Ok, the WARNINGs make sense - but now I'm getting the requests on the > server not only out of order but also with repeats (still using my > server ws_rm.xml with the delivery assurance). > > Finally, I added request-response calls to the Client.java code, > following the one-way calls. Now the output is: > > server: > [java] Starting Server > [java] Server ready... > [java] Executing operation greetMeOneWay > > [java] Hello there Anne > [java] Executing operation greetMeOneWay > > [java] Hello there Chris > [java] Jan 4, 2011 9:02:54 PM org.apache.cxf.ws.rm.Proxy acknowledge > [java] WARNING: It is not possible to send out-of-band > acknowledgments to the anonymous address. > [java] An acknowledgement will be piggybacked on the next response. > [java] Jan 4, 2011 9:02:56 PM > org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging > [java] WARNING: Interceptor for > {http://cxf.apache.org/hello_world_soap_http}GreeterService#{http://cxf.apa > che.org/hello_world_soap_http}greetMeOneWay has thrown exception, unwinding > now > [java] java.util.ConcurrentModificationException > [java] at > java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449) > [java] at java.util.AbstractList$Itr.next(AbstractList.java:420) > [java] at > com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister$1.next(Lister.j > ava:284) [java] ... > [java] Executing operation greetMeOneWay > [java] at > org.apache.cxf.ws.rm.soap.RMSoapInterceptor.encodeProperty(RMSoapIntercepto > r.java:396) [java] at > org.apache.cxf.ws.rm.soap.RMSoapInterceptor.encode(RMSoapInterceptor.java:2 > 06) [java] ... > [java] Jan 4, 2011 9:02:56 PM > org.apache.cxf.ws.addressing.ContextUtils rebaseResponse > [java] WARNING: SERVER_TRANSPORT_REBASE_FAILURE_MSG > [java] org.apache.cxf.interceptor.Fault > [java] at > org.apache.cxf.ws.addressing.ContextUtils.rebaseResponse(ContextUtils.java: > 408) [java] at > org.apache.cxf.ws.addressing.MAPAggregator.mediate(MAPAggregator.java:547) > [java] at > org.apache.cxf.ws.addressing.MAPAggregator.handleMessage(MAPAggregator.java > :227) [java] at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai > n.java:255) [java] at > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationO > bserver.java:113) [java] at > org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(Jet > tyHTTPDestination.java:311) > > [java] Hello there Bill > [java] at > org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTT > PDestination.java:280) ... > [java] Executing operation greetMeOneWay > > [java] Hello there Anne > [java] at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai > n.java:255) [java] at > org.apache.cxf.ws.addressing.ContextUtils.rebaseResponse(ContextUtils.java: > 403) [java] ... 23 more > [java] Executing operation greetMeOneWay > > [java] Hello there Chris > [java] Executing operation greetMeOneWay > > [java] Hello there Daisy > [java] Jan 4, 2011 9:02:58 PM org.apache.cxf.ws.rm.Proxy acknowledge > [java] WARNING: It is not possible to send out-of-band > acknowledgments to the anonymous address. > [java] An acknowledgement will be piggybacked on the next response. > [java] Executing operation greetMeOneWay > > [java] Hello there Anne > [java] Executing operation greetMeOneWay > > [java] Hello there Bill > [java] Jan 4, 2011 9:03:02 PM org.apache.cxf.ws.rm.Proxy acknowledge > [java] WARNING: It is not possible to send out-of-band > acknowledgments to the anonymous address. > [java] An acknowledgement will be piggybacked on the next response. > [java] Executing operation greetMe > [java] Message received: Anne > > [java] Jan 4, 2011 9:03:22 PM > org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate > [java] INFO: Cannot resend to anonymous target. Not scheduling a > resend. > [java] Jan 4, 2011 9:03:24 PM org.apache.cxf.ws.rm.Proxy acknowledge > [java] WARNING: It is not possible to send out-of-band > acknowledgments to the anonymous address. > [java] An acknowledgement will be piggybacked on the next response. > [java] Executing operation greetMe > [java] Message received: Bill > > [java] Jan 4, 2011 9:03:26 PM > org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate > [java] INFO: Cannot resend to anonymous target. Not scheduling a > resend. > [java] Executing operation greetMe > [java] Message received: Chris > > [java] Jan 4, 2011 9:03:26 PM > org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate > [java] INFO: Cannot resend to anonymous target. Not scheduling a > resend. > [java] Jan 4, 2011 9:03:28 PM org.apache.cxf.ws.rm.Proxy acknowledge > [java] WARNING: It is not possible to send out-of-band > acknowledgments to the anonymous address. > [java] An acknowledgement will be piggybacked on the next response. > [java] Executing operation greetMe > [java] Message received: Chris > > [java] Jan 4, 2011 9:03:30 PM > org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate > [java] INFO: Cannot resend to anonymous target. Not scheduling a > resend. > [java] Executing operation greetMe > [java] Message received: Daisy > > [java] Jan 4, 2011 9:03:30 PM > org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate > [java] INFO: Cannot resend to anonymous target. Not scheduling a > resend. > [java] Jan 4, 2011 9:03:32 PM org.apache.cxf.ws.rm.Proxy acknowledge > [java] WARNING: It is not possible to send out-of-band > acknowledgments to the anonymous address. > [java] An acknowledgement will be piggybacked on the next response. > [java] Server exiting > > The exception doesn't happen every time, but was interesting to see. > > Am I doing something wrong here? > > - Dennis -- Daniel Kulp dkulp@apache.org http://dankulp.com/blog