Transactional messaging approaches
JMS services support various approaches to the processing of translational messages. Transactional messaging applies to TIBCO EMS and WebSphere® JMS handlers.
Single JMS session to receive and send
- Configure the server with the
Transactionalproperty enabled. - Configure the service with a handler and a URL.
- For the handler and URL, use the same server configuration with the
Transactionalproperty enabled. - Define the URL with the
Transactional=trueparameter.
With this configuration, the handler and URL use the same JMS transacted session. A single
COMMIT or ROLLBACK operation is run depending on the processing
result to ensure once-and-only-once
message delivery of JMS messages.
Single JMS session with commit
COMMIT operation after a successful send on
the back end.- Configure the server with the
Transactionalproperty enabled. - Configure the service with a handler and a URL.
- For the handler and URL, use the same server configuration with the
Transactionalproperty enabled. - Define the URL with the
Sync=trueparameter.
- Receive messages on the front end.
- Send messages on the back end.
- Issue a
COMMITorROLLBACKoperation immediately after the request message is sent on the back end.
- The first transaction carries the message from the front-end request queue to the back-end request queue.
- The second transaction carries the reply message from back-end response queue for front-end response queue.
Shared JMS session in message fanout
dp:url-open, or dp:soap-call extension function with the same
transacted JMS session. The results action, dp:url-open, or
dp:soap-call extension function might be a part of a request, a response, or an
error rule.- Configure the server with the
Transactionalproperty enabled. - Configure the service with a handler.
- Configure a processing policy with at least one action that uses a URL
call such as a results action, a
dp:url-open, ordp:soap-callextension function.Note: Asynchronous actions do not support the JMS transacted session. - Configure all URL open calls with the
Transactional=trueparameter. - Configure the handler and all URL calls with the same server configuration
with the
Transactionalproperty enabled. - If necessary, use a URL defined with the
Transactional=trueparameter.
In this configuration, the same transacted JMS session receives the message, sends it with a
results action or a dp:url-open extension function, and can send on the URL. The
JMS transacted session is shared not only between the handler and the URL, but also between any URL
calls in the processing policy.
A single COMMIT or ROLLBACK operation is run depending on
processing result to ensure once-and-only-once
message delivery to the JMS messages. All
calls to the server use the same shared, transacted session.
Shared JMS session in message fanout with commit
COMMIT operation on the successful
send operation on any results action, dp:url-open, or dp:soap-call
extension functions. The results action, dp:url-open, or
dp:soap-call extension function might be a part of either a request, a response, or
an error rule.- Configure the server with the
Transactionalproperty enabled. - Configure the service with a handler.
- Configure a processing policy with at least one action that uses a URL
call such as a results action, a
dp:url-open, ordp:soap-callextension function.Note: Asynchronous actions do not support the JMS transacted session. - Specify the
Sync=trueparameter on the URL open calls whereCOMMITorROLLBACKis done immediately after the message is sent. - Configure the handler and all URL calls with the same server configuration
with the
Transactionalproperty enabled. - If necessary, use a URL.
- Receives the message on the front end.
- Sends the message with a processing action
- Immediately runs a
COMMITorROLLBACKoperation.
The COMMIT or ROLLBACK operation can be run on any results
action, dp:url-open, or dp:soap-call extension function that is
part of the processing policy after the request message was sent to the server. If the JMS session
is shared between the front end and the back end, this COMMIT or
ROLLBACK serves as the end of transactions for both receive and send operation.
Sync=true parameter.- The URL is defined with a reply queue parameter.
- The processing policy contains any other actions with the same shared transacted JMS session.