If you look further down my email you'll see the results of tests with synchronous calls (the last set, which included the concurrent modification exception).
As far as the ordering of one-way messages go, I'd say that the whole point of WS-RM is to guarantee delivery and/or sequencing at the application level - so if the client is sending requests in a particular order (as shown by the sequence numbers assigned on the client side) InOrder is supposed to mean that the service provider code gets called with those requests in the same order. Likewise on the ExactlyOnce assurance. Besides the issues I noticed when using the modified sample code, I've also seen other problems when testing with a modified Tcpmon that allows me to drop messages and unexpectedly close connections. It looks like the socket exceptions are causing the retry logic to mess up. I have a client who is interested in commissioning me to work on both fixing issues in the existing WS-RM code and extending the code to support WS-RM 1.1 and 1.2. This would include adding an option to support WS-Addressing 1.0 for WS-RM 1.0 (as used by .Net - https://issues.apache.org/jira/browse/CXF-1254 - and also by Metro). Are these contributions which would likely be of interest to the CXF project? - Dennis On 01/05/2011 10:50 AM, Daniel Kulp wrote: > 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 <wsrm-mgr:InOrder/> 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 >> <cxf:logging/> 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 >> <wsrm-mgr:reliableMessaging> element in the server ws_rm.xml: >> >> <wsrm-mgr:deliveryAssurance> >> <wsrm-mgr:ExactlyOnce/> >> <wsrm-mgr:InOrder/> >> </wsrm-mgr:deliveryAssurance> >> >> 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 <http:conduit> 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 <init> >> [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 <init> >> [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 <init> >> [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 <init> >> [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 <init> >> [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 >> >
