Hi Frizz,
You can learn more about the RM implementation here:
http://cxf.apache.org/docs/ws-reliablemessaging.html and here:
http://cxf.apache.org/docs/wsrmconfiguration.html
Yes, the RM interceptors take care of sending the CreateSequence and
CreateSequenceResponse, as well as the rest. As of CXF 3.0, the default
is to close the sequence when the CXF Client is closed. You can also
control this via JMX, if you wish.
The RM operation should be pretty much automatic, especially now that
the sequence is shutdown when you close the client. There's also a new
hook added in CXF 3.0 to monitor the message exchange so you can tell
when everything is completed, without the need to use JMX (so you can
have your client code wait until all messages have been acknowledged
before it closes the CXF client). I don't think I added that to the
documentation yet, but you can see the test code using it at
systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/MessageCallbackOnewayTest.java
(trunk only).
Regards,
- Dennis
Dennis M. Sosnoski
Java Web Services Consulting <http://www.sosnoski.com/consult.html>
CXF and Web Services Security Training
<http://www.sosnoski.com/training.html>
Web Services Jump-Start <http://www.sosnoski.com/jumpstart.html>
On 03/31/2014 10:51 PM, Frizz wrote:
Hi there,
I am looking into the WS-RM example included in the distribution under
distribution/src/main/release/samples/ws_rm/.
The client and server both apply the Reliable Messaging feature to the CXF
Bus, so basically everything happens "automatically".
I assume the RMOutInterceptor creates a wsrm:CreateSequence when sending
the first message, yes?
I also assume there will never be a corresponding wsrm:CloseSequence
wsrm:TerminateSequence, no?
Two questions:
(1) How can I manually trigger a wsrm:CloseSequence?
(2) How does WS-RM work in real life environments? I mean, do I have to
manually "bundle" my messages on groups of, say, 5 messages
(wsrm:CreateSequence + send 5 messages + wsrm:CloseSequence)?
Or do I only do a wsrm:CreateSequence (and a wsrm:CloseSequence once my
application terminates) and set wsrm-policy:BaseRetransmissionInterval to a
"meaningful" value? Or or or ...
cheers,
Frizz