- java.lang.Object
-
- jakarta.xml.ws.WebServiceFeature
-
- com.sun.xml.ws.rx.rm.api.ReliableMessagingFeature
-
- All Implemented Interfaces:
com.sun.xml.ws.api.ha.StickyFeature
@ManagedData public class ReliableMessagingFeature extends jakarta.xml.ws.WebServiceFeature implements com.sun.xml.ws.api.ha.StickyFeatureReliable messaging feature is an implementation ofWebServiceFeaturethat configures Metro Reliable Messaging runtime functionality. Since there is a lot to configure in Reliable Messaging domain, to build create an instance ofReliableMessagingFeature, use a convenienceReliableMessagingFeatureBuilderbuilder class.- Author:
- Marek Potociar
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReliableMessagingFeature.BackoffAlgorithmDefines the enumeration of all possible backoff algortihms that can be applied for to message retransmission.static classReliableMessagingFeature.DeliveryAssuranceDefines the enumeration of Delivery Assurance options, which can be supported by RM Sources and RM Destinations.static classReliableMessagingFeature.SecurityBindingDefines the enumeration of possible security binding mechanism options that can be applied to a created sequence.
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_ACK_REQUEST_TRANSMISSION_INTERVALA constant specifying the default value of interval between sending subsequent acknowledgement request messages.static longDEFAULT_ACKNOWLEDGEMENT_TRANSMISSION_INTERVALSpecifies the duration in milliseconds after which the RM Destination will transmit an acknowledgement.static longDEFAULT_CLOSE_SEQUENCE_OPERATION_TIMEOUTA constant specifying the default value of close sequence operation timeout.static longDEFAULT_DESTINATION_BUFFER_QUOTAA constant specifying the default value of destination flow control buffer quota.static longDEFAULT_MAX_CONCURRENT_SESSIONSA constant specifying the default value for how many concurrently active RM sessions (measured based on inbound RM sequences) the sequence manager dedicated to the WS Endpoint accepts before starting to refuse new requests for sequence creation.static longDEFAULT_MAX_MESSAGE_RETRANSMISSION_COUNTA constant specifies the default value of maximum number of message redelivery attempts.static longDEFAULT_MAX_RM_SESSION_CONTROL_MESSAGE_RESEND_ATTEMPTSA constant specifies the default value of maximum number of attempts to send a reliable messaging session control messgae such as CreateSequence, CloseSequence and TerminateSequence Currently, the default value is set to 3.static longDEFAULT_MESSAGE_RETRANSMISSION_INTERVALA constant specifying the default value of base message retransmission interval.static booleanDEFAULT_OFFER_ELEMENT_GENERATION_DISABLEDA constant specifying the default value for disabling the generation of theOfferelement as part of theCreateSequencemessage.static booleanDEFAULT_REJECT_OUT_OF_ORDER_MESSAGESA constant specifying the default value for enabling "reject out-of-order messages".static longDEFAULT_SEQUENCE_INACTIVITY_TIMEOUTA constant specifying the default value of sequence inactivity timeout.static longDEFAULT_SEQUENCE_MANAGER_MAINTENANCE_PERIODDefault period (in milliseconds) of a sequence manager maintenance task execution.static booleanDEFAULT_STATE_UPDATE_ON_RECEIVED_ACKREQUESTED_DISABLEDA constant specifying the default value for turning off state update when received AckRequested is processed at RMD.static booleanDEFAULT_XA_TX_FOR_SERVER_RMDA constant specifying the default value for enabling XA TX at server side RMD.static intDEFAULT_XA_TX_FOR_SERVER_RMD_TIMEOUT_SECONDSA constant specifying the default value for XA TX timeout that is used at server side RMD (in seconds).static StringID
-
Constructor Summary
Constructors Constructor Description ReliableMessagingFeature()This constructor is here to satisfy JAX-WS specification requirementsReliableMessagingFeature(boolean enabled)This constructor is here to satisfy JAX-WS specification requirementsReliableMessagingFeature(boolean enabled, RmProtocolVersion version, long inactivityTimeout, long bufferQuota, boolean orderedDelivery, ReliableMessagingFeature.DeliveryAssurance deliveryAssurance, ReliableMessagingFeature.SecurityBinding securityBinding, boolean persistenceEnabled, long sequenceManagerMaintenancePeriod, long maxConcurrentSessions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanRetransmitMessage(long nextRetransmissionCount)Returnstrueif the next attempt to retransmit a message indicated bynextRetransmissionCountinput parameter is allowed as per current feature configuration.longgetAcknowledgementTransmissionInterval()Specifies the duration after which the RM Destination will transmit an acknowledgement.longgetAckRequestTransmissionInterval()Specifies interval between sending subsequent acknowledgement request messages by an RM Source in case of any unacknowledged messages on the sequence.longgetCloseSequenceOperationTimeout()Specifies the timeout for aCloseSequenceRequestmessage.ReliableMessagingFeature.DeliveryAssurancegetDeliveryAssurance()Specifies the message delivery quality of service between the RM and application layer.longgetDestinationBufferQuota()This attribute may be used together with ordered delivery requirement.StringgetID()longgetMaxConcurrentSessions()Specifies how many concurrently active RM sessions (measured based on inbound RM sequences) the sequence manager dedicated to the WS Endpoint accepts before starting to refuse new requests for sequence creation.longgetMaxMessageRetransmissionCount()A message is considered to be transferred if its delivery at the recipient has been acknowledged by the recipient.longgetMaxRmSessionControlMessageResendAttempts()The infrastructure tries to send each RM session protocol control message such as CreateSequence, CloseSequence, TerminateSequence at most agetMaxRmSessionControlMessageResendAttempts()number of times.longgetMessageRetransmissionInterval()Specifies how long the RM Source will wait after transmitting a message before retransmitting the message if no acknowledgement arrives.RmProtocolVersiongetProtocolVersion()Specifies which WS-RM version SOAP messages and SOAP message headers should be used for communication between RM source and RM destinationReliableMessagingFeature.BackoffAlgorithmgetRetransmissionBackoffAlgorithm()Specifies that the retransmission interval will be adjusted using a specific backoff algorithm.ReliableMessagingFeature.SecurityBindinggetSecurityBinding()Specifies whether each created RM sequence must be bound to a specific underlying security token or secured transport.longgetSequenceInactivityTimeout()Specifies a period of inactivity for a Sequence in ms.longgetSequenceManagerMaintenancePeriod()Specifies the period (in milliseconds) of a sequence manager maintenance task execution.booleanisOfferElementGenerationDisabled()Specifies whether the generation of theOfferelement as part of theCreateSequencemessage is forced-disabled or not.booleanisOrderedDeliveryEnabled()Specifies a requirement that messages from each individual Sequence are to be delivered in the same order they have been sent by the Application Source.booleanisPersistenceEnabled()Specifies whether the runtime should use persistent message storage or not.booleanisRejectOutOfOrderMessagesEnabled()Specifies whether RMD should reject out-of-order messages that it receives.StringtoString()
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
DEFAULT_SEQUENCE_INACTIVITY_TIMEOUT
public static final long DEFAULT_SEQUENCE_INACTIVITY_TIMEOUT
A constant specifying the default value of sequence inactivity timeout. Currently the default value is set to 600000.- See Also:
- Constant Field Values
-
DEFAULT_DESTINATION_BUFFER_QUOTA
public static final long DEFAULT_DESTINATION_BUFFER_QUOTA
A constant specifying the default value of destination flow control buffer quota. Currently the default value is set to 32.- See Also:
- Constant Field Values
-
DEFAULT_MESSAGE_RETRANSMISSION_INTERVAL
public static final long DEFAULT_MESSAGE_RETRANSMISSION_INTERVAL
A constant specifying the default value of base message retransmission interval. Currently the default value is set to 2000.- See Also:
- Constant Field Values
-
DEFAULT_MAX_MESSAGE_RETRANSMISSION_COUNT
public static final long DEFAULT_MAX_MESSAGE_RETRANSMISSION_COUNT
A constant specifies the default value of maximum number of message redelivery attempts. Currently, the default value is set to infinity (-1).- See Also:
- Constant Field Values
-
DEFAULT_MAX_RM_SESSION_CONTROL_MESSAGE_RESEND_ATTEMPTS
public static final long DEFAULT_MAX_RM_SESSION_CONTROL_MESSAGE_RESEND_ATTEMPTS
A constant specifies the default value of maximum number of attempts to send a reliable messaging session control messgae such as CreateSequence, CloseSequence and TerminateSequence Currently, the default value is set to 3.- See Also:
- Constant Field Values
-
DEFAULT_ACKNOWLEDGEMENT_TRANSMISSION_INTERVAL
public static final long DEFAULT_ACKNOWLEDGEMENT_TRANSMISSION_INTERVAL
Specifies the duration in milliseconds after which the RM Destination will transmit an acknowledgement. Currently the default value is set to -1 => unspecified.- See Also:
- Constant Field Values
-
DEFAULT_ACK_REQUEST_TRANSMISSION_INTERVAL
public static final long DEFAULT_ACK_REQUEST_TRANSMISSION_INTERVAL
A constant specifying the default value of interval between sending subsequent acknowledgement request messages. Currently the default value is set to 2000.- See Also:
- Constant Field Values
-
DEFAULT_CLOSE_SEQUENCE_OPERATION_TIMEOUT
public static final long DEFAULT_CLOSE_SEQUENCE_OPERATION_TIMEOUT
A constant specifying the default value of close sequence operation timeout. Currently the default value is set to 3000.- See Also:
- Constant Field Values
-
DEFAULT_SEQUENCE_MANAGER_MAINTENANCE_PERIOD
public static final long DEFAULT_SEQUENCE_MANAGER_MAINTENANCE_PERIOD
Default period (in milliseconds) of a sequence manager maintenance task execution.- See Also:
- Constant Field Values
-
DEFAULT_MAX_CONCURRENT_SESSIONS
public static final long DEFAULT_MAX_CONCURRENT_SESSIONS
A constant specifying the default value for how many concurrently active RM sessions (measured based on inbound RM sequences) the sequence manager dedicated to the WS Endpoint accepts before starting to refuse new requests for sequence creation. Currently, the default value is set to infinity (-1).- See Also:
- Constant Field Values
-
DEFAULT_OFFER_ELEMENT_GENERATION_DISABLED
public static final boolean DEFAULT_OFFER_ELEMENT_GENERATION_DISABLED
A constant specifying the default value for disabling the generation of theOfferelement as part of theCreateSequencemessage.- See Also:
- Constant Field Values
-
DEFAULT_REJECT_OUT_OF_ORDER_MESSAGES
public static final boolean DEFAULT_REJECT_OUT_OF_ORDER_MESSAGES
A constant specifying the default value for enabling "reject out-of-order messages".- See Also:
- Constant Field Values
-
DEFAULT_STATE_UPDATE_ON_RECEIVED_ACKREQUESTED_DISABLED
public static final boolean DEFAULT_STATE_UPDATE_ON_RECEIVED_ACKREQUESTED_DISABLED
A constant specifying the default value for turning off state update when received AckRequested is processed at RMD.- See Also:
- Constant Field Values
-
DEFAULT_XA_TX_FOR_SERVER_RMD
public static final boolean DEFAULT_XA_TX_FOR_SERVER_RMD
A constant specifying the default value for enabling XA TX at server side RMD.- See Also:
- Constant Field Values
-
DEFAULT_XA_TX_FOR_SERVER_RMD_TIMEOUT_SECONDS
public static final int DEFAULT_XA_TX_FOR_SERVER_RMD_TIMEOUT_SECONDS
A constant specifying the default value for XA TX timeout that is used at server side RMD (in seconds).- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ReliableMessagingFeature
public ReliableMessagingFeature()
This constructor is here to satisfy JAX-WS specification requirements
-
ReliableMessagingFeature
public ReliableMessagingFeature(boolean enabled)
This constructor is here to satisfy JAX-WS specification requirements
-
ReliableMessagingFeature
public ReliableMessagingFeature(boolean enabled, RmProtocolVersion version, long inactivityTimeout, long bufferQuota, boolean orderedDelivery, ReliableMessagingFeature.DeliveryAssurance deliveryAssurance, ReliableMessagingFeature.SecurityBinding securityBinding, boolean persistenceEnabled, long sequenceManagerMaintenancePeriod, long maxConcurrentSessions)
-
-
Method Detail
-
getID
@ManagedAttribute public String getID()
- Specified by:
getIDin classjakarta.xml.ws.WebServiceFeature
-
getProtocolVersion
@ManagedAttribute public RmProtocolVersion getProtocolVersion()
Specifies which WS-RM version SOAP messages and SOAP message headers should be used for communication between RM source and RM destination- Returns:
- version currently configured for the feature. If not set explicitly,
the default value is specified by a call to
RmVersion#getDefault().
-
getSequenceInactivityTimeout
@ManagedAttribute public long getSequenceInactivityTimeout()
Specifies a period of inactivity for a Sequence in ms.- Returns:
- currently configured sequence inactivity timeout. If not set explicitly,
the default value is specified by
DEFAULT_SEQUENCE_INACTIVITY_TIMEOUTconstant.
-
getSecurityBinding
@ManagedAttribute public ReliableMessagingFeature.SecurityBinding getSecurityBinding()
Specifies whether each created RM sequence must be bound to a specific underlying security token or secured transport.- Returns:
- configured security binding requirement. If not set explicitly, the
default value is specified by a call to
ReliableMessagingFeature.SecurityBinding.getDefault(). - See Also:
ReliableMessagingFeature.SecurityBinding
-
getDeliveryAssurance
@ManagedAttribute public ReliableMessagingFeature.DeliveryAssurance getDeliveryAssurance()
Specifies the message delivery quality of service between the RM and application layer. It expresses the delivery assurance in effect between the RM Destination and its corresponding application destination, and it also indicates requirements on any RM Source that transmits messages to this RM destination. Conversely when used by an RM Source it expresses the delivery assurance in effect between the RM Source and its corresponding application source, as well as indicating requirements on any RM Destination that receives messages from this RM Source. In either case the delivery assurance does not affect the messages transmitted on the wire.- Returns:
- currently configured delivery assurance mode. If not set explicitly,
the default value is specified by a call to
ReliableMessagingFeature.DeliveryAssurance.getDefault(). - See Also:
ReliableMessagingFeature.DeliveryAssurance
-
isOrderedDeliveryEnabled
@ManagedAttribute public boolean isOrderedDeliveryEnabled()
Specifies a requirement that messages from each individual Sequence are to be delivered in the same order they have been sent by the Application Source. The RM Source will ensure that the ordinal position of each message in the Sequence (as indicated by a message Sequence number) is consistent with the order in which the messages have been sent from the Application Source. The RM Destination will deliver received messages for each Sequence in the order indicated by the message numbering.
In-order delivery can be used in combination with any of the
ReliableMessagingFeature.DeliveryAssurancevalues, and the requirements of those values will also be met. In particular if theReliableMessagingFeature.DeliveryAssurance.AT_LEAST_ONCEorReliableMessagingFeature.DeliveryAssurance.EXACTLY_ONCEvalue is applied and the RM Destination detects a gap in the Sequence then the RM Destination will not deliver any subsequent messages from that Sequence until the missing messages are received or until the Sequence is closed.- Returns:
trueif the ordered delivery si required,falseotherwise. If not set explicitly, the default value isfalse.
-
getDestinationBufferQuota
@ManagedAttribute public long getDestinationBufferQuota()
This attribute may be used together with ordered delivery requirement. It specifies the maximum number of out-of-order unprocessed request messages that may be stored in the unprocessed request message buffer within the RM destination before the RM destination starts rejecting new request messages.- Returns:
- currently configured flow control buffer on the destination. If not
set explicitly, the default value is specified by
DEFAULT_DESTINATION_BUFFER_QUOTAconstant.
-
getMessageRetransmissionInterval
@ManagedAttribute public long getMessageRetransmissionInterval()
Specifies how long the RM Source will wait after transmitting a message before retransmitting the message if no acknowledgement arrives.- Returns:
- currently configured base retransmission interval. If not set explicitly,
the default value is specified by
DEFAULT_MESSAGE_RETRANSMISSION_INTERVALconstant.
-
getRetransmissionBackoffAlgorithm
@ManagedAttribute public ReliableMessagingFeature.BackoffAlgorithm getRetransmissionBackoffAlgorithm()
Specifies that the retransmission interval will be adjusted using a specific backoff algorithm.- Returns:
- currently configured retransmission back-off algorithm that should be
used. If not set explicitly, the default value is specified by a
call to
ReliableMessagingFeature.BackoffAlgorithm.getDefault(). - See Also:
ReliableMessagingFeature.BackoffAlgorithm
-
getMaxMessageRetransmissionCount
@ManagedAttribute public long getMaxMessageRetransmissionCount()
A message is considered to be transferred if its delivery at the recipient has been acknowledged by the recipient. If an acknowledgment has not been received within a certain amount of time for a message that has been transmitted, the infrastructure automatically retransmits the message. By default, the number of retransmissions is not limited. This can be checked by a call to#isMessageRetransmissionLimited()method. In case the#isMessageRetransmissionLimited()returnstrue, the infrastructure tries to send the message for at most agetMaxMessageRetransmissionCount()number of times. Not receiving an acknowledgment before this limit is reached is considered to be a fatal communication failure, and causes the RM session to fail. The infrastructure uses a back-off algorithm retrieved viagetRetransmissionBackoffAlgorithm()to determine when to retransmit, based on the configured base retransmission time retrieved via a call togetMessageRetransmissionInterval().- Returns:
- maximum number of message transmission retries
-
canRetransmitMessage
public boolean canRetransmitMessage(long nextRetransmissionCount)
Returnstrueif the next attempt to retransmit a message indicated bynextRetransmissionCountinput parameter is allowed as per current feature configuration.- Parameters:
nextRetransmissionCount- indicates the ordinal number of the next (potential) attempt to retransmit a single message- Returns:
trueif it is possible to retransmit a message,falseotherwise.- See Also:
getMaxMessageRetransmissionCount()
-
getMaxRmSessionControlMessageResendAttempts
@ManagedAttribute public long getMaxRmSessionControlMessageResendAttempts()
The infrastructure tries to send each RM session protocol control message such as CreateSequence, CloseSequence, TerminateSequence at most agetMaxRmSessionControlMessageResendAttempts()number of times. Not receiving an acknowledgment before this limit is reached is considered a fatal communication failure, and causes the RM session to fail.- Returns:
- maximum number of reliable messaging session handshake message transmission attempts
-
getAcknowledgementTransmissionInterval
@ManagedAttribute public long getAcknowledgementTransmissionInterval()
Specifies the duration after which the RM Destination will transmit an acknowledgement. Specified in milliseconds.- Returns:
- currently configured acknowledgement transmission interval. If not set explicitly,
the default value is specified by the
DEFAULT_ACKNOWLEDGEMENT_TRANSMISSION_INTERVALconstant.
-
getAckRequestTransmissionInterval
@ManagedAttribute public long getAckRequestTransmissionInterval()
Specifies interval between sending subsequent acknowledgement request messages by an RM Source in case of any unacknowledged messages on the sequence.- Returns:
- currently configured acknowledgement request transmission interval.
If not set explicitly, the default value is specified by the
DEFAULT_ACK_REQUEST_TRANSMISSION_INTERVALconstant.
-
getCloseSequenceOperationTimeout
@ManagedAttribute public long getCloseSequenceOperationTimeout()
Specifies the timeout for aCloseSequenceRequestmessage. If no response is returned from RM destination before the timout expires, the sequence is automatically closed by the RM source and all associated resources are released.- Returns:
- currently configured close sequence operation timeout. If not set explicitly,
the default value is specified by the
DEFAULT_CLOSE_SEQUENCE_OPERATION_TIMEOUTconstant.
-
isPersistenceEnabled
@ManagedAttribute public boolean isPersistenceEnabled()
Specifies whether the runtime should use persistent message storage or not.- Returns:
trueif the runtime should use persistent message storage,falseotherwise
-
getSequenceManagerMaintenancePeriod
@ManagedAttribute public long getSequenceManagerMaintenancePeriod()
Specifies the period (in milliseconds) of a sequence manager maintenance task execution.- Returns:
- the period (in milliseconds) of a sequence manager maintenance task execution.
-
getMaxConcurrentSessions
@ManagedAttribute public long getMaxConcurrentSessions()
Specifies how many concurrently active RM sessions (measured based on inbound RM sequences) the sequence manager dedicated to the WS Endpoint accepts before starting to refuse new requests for sequence creation.- Returns:
- maximum number of concurrent RM sessions
-
isOfferElementGenerationDisabled
public boolean isOfferElementGenerationDisabled()
Specifies whether the generation of theOfferelement as part of theCreateSequencemessage is forced-disabled or not.- Returns:
trueif the generation of theOfferelement as part of theCreateSequencemessage is forced-disabled,falseotherwise.
-
isRejectOutOfOrderMessagesEnabled
public boolean isRejectOutOfOrderMessagesEnabled()
Specifies whether RMD should reject out-of-order messages that it receives.- Returns:
trueif RMD should reject out-of-order messages. Default is false.
-
-