Providing transactional recoverable messaging through WS-ReliableMessaging
If the WS-ReliableMessaging application is running inside the Web container and using a managed quality of service, we can use WS-ReliableMessaging to provide transactional recoverable messaging.
The WS-ReliableMessaging transactional model is as follows:
- On the Web service requester side, the transaction is between the application and the local managed store.
- The WS-ReliableMessaging protocol delivers the message to the Web service provider side, where a different transaction is used between the second managed store and the application being dispatched.
For the outbound (requestor) case on a one-way message send, if the enableTransactionalOneWay property is set to true, then the send is performed under any transactional context currently held by the application's thread. (Note that transactions are not supported under an outbound two-way message exchange).
For the inbound (provider) case, if the inOrderDelivery property is set to true, then an inbound message is dispatched to the application under a transaction. In the case of an inbound two way message exchange, the response is also generated under that transaction and is not sent until that transaction has committed.
WS-ReliableMessaging transactions do not use the WS-AtomicTransactions protocol. The relationship between these two protocols is as follows:
- WS-AtomicTransactions and WS-ReliableMessaging are mutually exclusive when WS-ReliableMessaging is being used, with a managed store, to provide transactional recoverable messaging.
- If WS-ReliableMessaging is configured to use an in-memory store, then there are cases where a WS-AtomicTransaction can be flowed between the reliable messaging source and the reliable messaging destination for two-way invocations. In this situation, WS-ReliableMessaging only protects against network failures, not against server failure.
To provide transactional recoverable messaging through WS-ReliableMessaging, work through the steps described in Building a reliable Web service application and also complete the following additional steps:
- To enable transactional messaging for outbound (requester) one-way message sends, when you develop the JAX-WS Web service application set the enableTransactionalOneWay property to Boolean.TRUE (or the string true) in the jaxWS request context map.
- To enable transactional messaging for inbound (provider) one-way and two-way message exchanges, when you configure the WS-ReliableMessaging policy either use the admin console to select the option Deliver messages in the order that they were sent or use the wsadmin tool to set the inOrderDelivery property to true.
Related tasks
Set the WS-ReliableMessaging policy
Learn about WS-ReliableMessaging
Detecting and fixing problems with WS-ReliableMessaging
Develop a reliable Web service application
Administer reliable Web services
Related
WS-ReliableMessaging: supported specifications and standards 
Related information
Set a WS-ReliableMessaging policy set
Set a WS-ReliableMessaging policy set using wsadmin