Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.此内容没有您所选择的语言版本。
19.4. Runtime Control
Overview 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Several message context property values can be set in client code to control WS-RM at runtime, with key values defined by public constants in the
org.apache.cxf.ws.rm.RMManager
class.
Runtime control options 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
The following table lists the keys defined by the
org.apache.cxf.ws.rm.RMManager
class.
Key | Description |
---|---|
WSRM_VERSION_PROPERTY
|
String WS-RM version namespace (
http://schemas.xmlsoap.org/ws/2005/02/rm/ or http://docs.oasis-open.org/ws-rx/wsrm/200702 ).
|
WSRM_WSA_VERSION_PROPERTY
| 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). |
WSRM_LAST_MESSAGE_PROPERTY
| Boolean value true to tell the WS-RM code that the last message is being sent, allowing the code to close the WS-RM sequence and release resources (as of the 3.0.0 version of CXF, the WS-RM will close the RM sequence by default, when you close your client). |
WSRM_INACTIVITY_TIMEOUT_PROPERTY
| Long inactivity timeout in milliseconds. |
WSRM_RETRANSMISSION_INTERVAL_PROPERTY
| Long base retransmission interval in milliseconds. |
WSRM_EXPONENTIAL_BACKOFF_PROPERTY
| Boolean exponential back-off flag. |
WSRM_ACKNOWLEDGEMENT_INTERVAL_PROPERTY
| Long acknowledgement interval in milliseconds. |
Controlling WS-RM through JMX 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
You can also monitor and control many aspects of WS-RM using the JMX Management features of Apache 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 or terminate a WS-RM sequence, and to receive notification of when previously-sent messages are acknowledged by the remote RM endpoint.
Example of JMX control 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
For example, if you have the JMX server enabled in your client configuration, you could use the following code to track the last acknowledgement number received: