cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r882448 - in /websites/production/cxf/content: cache/docs.pageCache docs/ws-reliablemessaging.html
Date Sun, 13 Oct 2013 21:47:52 GMT
Author: buildbot
Date: Sun Oct 13 21:47:52 2013
New Revision: 882448

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/ws-reliablemessaging.html

Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/cxf/content/docs/ws-reliablemessaging.html
==============================================================================
--- websites/production/cxf/content/docs/ws-reliablemessaging.html (original)
+++ websites/production/cxf/content/docs/ws-reliablemessaging.html Sun Oct 13 21:47:52 2013
@@ -28,6 +28,15 @@
 <meta name="description" content="Apache CXF, Services Framework - WS-ReliableMessaging">
 
 
+<link type="text/css" rel="stylesheet" href="/resources/highlighter/styles/shCoreCXF.css">
+<link type="text/css" rel="stylesheet" href="/resources/highlighter/styles/shThemeCXF.css">
+
+<script src='/resources/highlighter/scripts/shCore.js'></script>
+<script src='/resources/highlighter/scripts/shBrushJava.js'></script>
+<script>
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+</script>
 
 
     <title>
@@ -124,7 +133,7 @@ Apache CXF -- WS-ReliableMessaging
 
 <p>CXF supports both the official <a shape="rect" class="external-link" href="http://docs.oasis-open.org/ws-rx/wsrm/200702"
rel="nofollow">1.1/1.2 Web Services Reliable Messaging</a> (WS-ReliableMessaging)
protocol using the http://docs.oasis-open.org/ws-rx/wsrm/200702 namespace and the outdated
<a shape="rect" class="external-link" href="http://schemas.xmlsoap.org/ws/2005/02/rm/"
rel="nofollow">February 2005 submission version</a> using the http://schemas.xmlsoap.org/ws/2005/02/rm/
namespace.</p>
 
-<p>The submission version specified an outdated version of WS-Addressing, using the
<a shape="rect" class="external-link" href="http://schemas.xmlsoap.org/ws/2004/08/addressing"
rel="nofollow">http://schemas.xmlsoap.org/ws/2004/08/addressing</a> namespace, which
has since been replaced by the official <a shape="rect" class="external-link" href="http://www.w3.org/2005/08/addressing"
rel="nofollow">http://www.w3.org/2005/08/addressing</a> namespace. Most other web
services implementations supporting the submission version of WS-ReliableMessaging have deviated
from the specification by moving to the official WS-Addressing release with the <a shape="rect"
class="external-link" href="http://www.w3.org/2005/08/addressing" rel="nofollow">http://www.w3.org/2005/08/addressing</a>
namespace. CXF supports the submission version of RM with either WS-Addressing namespace.</p>
+<p>The submission version specified an outdated version of WS-Addressing, using the
http://schemas.xmlsoap.org/ws/2004/08/addressing namespace, which has since been replaced
by the official http://www.w3.org/2005/08/addressing namespace. Most other web services implementations
supporting the submission version of WS-ReliableMessaging have deviated from the specification
by moving to the official WS-Addressing release with the http://www.w3.org/2005/08/addressing
namespace. CXF supports the submission version of RM with either WS-Addressing namespace.</p>
 
 <p>For compatibility with older versions of CXF, the default is to use the February
2005 submission version of RM with the submission version of WS-Addressing. On the client
side, you can CXF for whichever version of WS-ReliableMessaging you want to use (see <a
shape="rect" href="wsrmconfiguration.html" title="WSRMConfiguration">Reliable Messaging
Configuration Guide</a>). On the provider side, CXF adapts to whichever version of WS-ReliableMessaging
is used by the client and responds appropriately.</p>
 
@@ -148,21 +157,44 @@ Apache CXF -- WS-ReliableMessaging
 <p>Several message context property values can be set in client code to control the
RM operation at runtime, with key values defined by public constants in org.apache.cxf.ws.rm.RMManager:</p>
 
 <div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"> Key </th><th colspan="1" rowspan="1" class="confluenceTh">
Value </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
WSRM_VERSION_PROPERTY </td><td colspan="1" rowspan="1" class="confluenceTd"> String
WS-RM version namespace (
-<a shape="rect" class="external-link" href="http://schemas.xmlsoap.org/ws/2005/02/rm/"
rel="nofollow">http://schemas.xmlsoap.org/ws/2005/02/rm/</a>
-<p> or </p>
-<a shape="rect" class="external-link" href="http://docs.oasis-open.org/ws-rx/wsrm/200702"
rel="nofollow">http://docs.oasis-open.org/ws-rx/wsrm/200702</a>
-<p>) </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
WSRM_WSA_VERSION_PROPERTY </td><td colspan="1" rowspan="1" class="confluenceTd">
String WS-Addressing version namespace (
-<a shape="rect" class="external-link" href="http://schemas.xmlsoap.org/ws/2004/08/addressing"
rel="nofollow">http://schemas.xmlsoap.org/ws/2004/08/addressing</a>
-<p> or </p>
-<a shape="rect" class="external-link" href="http://www.w3.org/2005/08/addressing" rel="nofollow">http://www.w3.org/2005/08/addressing</a>
-<p>) - this property is ignored unless you're using the </p>
-<a shape="rect" class="external-link" href="http://schemas.xmlsoap.org/ws/2005/02/rm/"
rel="nofollow">http://schemas.xmlsoap.org/ws/2005/02/rm/</a>
-<p> RM namespace) </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> WSRM_LAST_MESSAGE_PROPERTY </td><td colspan="1" rowspan="1"
class="confluenceTd"> Boolean value TRUE to tell the RM code that the last message is being
sent, allowing the code to close the RM sequence and release resources (as of the 3.0.0 version
of CXF the RM code will by default close the RM sequence when you close your client; earlier
versions of CXF did not close the sequence unless told to using this flag, or if configured
with a source policy &lt;wsrm-mgr:sequenceTerminationPolicy terminateOnShutdown="true"/&gt;)
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> WSRM_INACTIVITY_TIMEOUT_PROPERTY
</td><td colspan="1" rowspan="1" class="confluenceTd"> Long inactivity timeout
in milliseconds </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
WSRM_RETRANSMISSION_INTERVAL_PROPERTY </td><td colspan="1" rowspan="1" class="confluenceTd">
Long base retransmission interval in
  milliseconds </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
WSRM_EXPONENTIAL_BACKOFF_PROPERTY </td><td colspan="1" rowspan="1" class="confluenceTd">
Boolean exponential backoff flag </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> WSRM_ACKNOWLEDGEMENT_INTERVAL_PROPERTY </td><td colspan="1"
rowspan="1" class="confluenceTd"> Long acknowledgement interval in milliseconds </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"> Key </th><th colspan="1" rowspan="1" class="confluenceTh">
Value </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
WSRM_VERSION_PROPERTY </td><td colspan="1" rowspan="1" class="confluenceTd"> String
WS-RM version namespace (http://schemas.xmlsoap.org/ws/2005/02/rm/ or http://docs.oasis-open.org/ws-rx/wsrm/200702)
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> WSRM_WSA_VERSION_PROPERTY
</td><td colspan="1" rowspan="1" class="confluenceTd"> String WS-Addressing version
namespace (http://schemas.xmlsoap.org/ws/2004/08/addressing or http://www.w3.org/2005/08/addressing)
- this property is ignored unless you're using the http://schemas.xmlsoap.org/ws/2005/02/rm/
RM namespace) </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">
WSRM_LAST_MESSAGE_PROPERTY </td><td colspan="1" rowspan="1" class="confluenceTd">
Boolean value TRUE to tell the RM code that the 
 last message is being sent, allowing the code to close the RM sequence and release resources
(as of the 3.0.0 version of CXF the RM code will by default close the RM sequence when you
close your client; earlier versions of CXF did not close the sequence unless told to using
this flag, or if configured with a source policy &lt;wsrm-mgr:sequenceTerminationPolicy
terminateOnShutdown="true"/&gt;) </td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"> WSRM_INACTIVITY_TIMEOUT_PROPERTY </td><td colspan="1" rowspan="1"
class="confluenceTd"> Long inactivity timeout in milliseconds </td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"> WSRM_RETRANSMISSION_INTERVAL_PROPERTY </td><td
colspan="1" rowspan="1" class="confluenceTd"> Long base retransmission interval in milliseconds
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> WSRM_EXPONENTIAL_BACKOFF_PROPERTY
</td><td colspan="1" rowspan="1" class="confluenceTd"> Boolean exponential backoff
flag </td></tr><tr><t
 d colspan="1" rowspan="1" class="confluenceTd"> WSRM_ACKNOWLEDGEMENT_INTERVAL_PROPERTY
</td><td colspan="1" rowspan="1" class="confluenceTd"> Long acknowledgement interval
in milliseconds </td></tr></tbody></table>
 </div>
 
 
-<p>You can also monitor and control many aspects of RM using the JMX+Management features
of CXF. </p></div>
+<p>You can also monitor and control many aspects of RM using the <a shape="rect"
href="jmx-management.html" title="JMX Management">JMX Management</a> features of
CXF. The full list of JMX operations is defined by org.apache.cxf.ws.rm.ManagedRMManager and
org.apache.cxf.ws.rm.ManagedRMEndpoint, but these operations include viewing the current RM
state down to the individual message level. You can also use JXM to close and/or terminate
an RM sequence, and to receive notification of when previously-sent messages are acknowledged
by the remote RM endpoint.</p>
+
+<p>For example, if you have the JMX server enabled in your client configuration you
could use this code to track the last acknowledgement number received:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+    private static class AcknowledgementListener implements NotificationListener {
+        private volatile long lastAcknowledgement;
+        
+        @Override
+        public void handleNotification(Notification notification, Object handback) {
+            if (notification instanceof AcknowledgementNotification) {
+                AcknowledgementNotification ack = (AcknowledgementNotification)notification;
+                lastAcknowledgement = ack.getMessageNumber();
+            }
+        }
+    }
+        // initialize client
+    ...
+        // attach to JMX bean for notifications
+        //  NOTE: you must have sent at least one message to initialize RM before executing
this code
+        Endpoint ep = ClientProxy.getClient(client).getEndpoint();
+        InstrumentationManager im = bus.getExtension(InstrumentationManager.class);
+        MBeanServer mbs = im.getMBeanServer();
+        RMManager clientManager = bus.getExtension(RMManager.class);
+        ObjectName name = RMUtils.getManagedObjectName(clientManager, ep);
+        System.out.println("Looking for endpoint name " + name);
+        AcknowledgementListener listener = new AcknowledgementListener();
+        mbs.addNotificationListener(name, listener, null, null);
+        
+        // send messages using RM with acknowledgement status reported to listener
+    ...
+
+]]></script>
+</div></div></div>
            </div>
            <!-- Content -->
          </td>



Mime
View raw message