Chapter 6. Scenario: WebSphere Message Broker acting as a transaction manager 117
3. A JMSInput node on the message flow deployed on WebSphere Message
Broker retrieves the JMS message from the WebSphere queue and manages
the transaction with two WebSphere MQ queue managers for a funds
transfer. The same can be extended to two third-party JMS providers as well.
4. A JMSOutput node in the message flow sends the JMS message to Bank1.
Another JMSOutput node sends the same message to Bank2 for debiting.
These messages are part of an XA transaction, where either both get
committed or both get rolled back simultaneously.
5. Depending on the outcome of the transaction, a message with a status of
transaction is sent back to the business process synchronously.
6.1.2 XA transactions with WebSphere Message Broker
A transaction (also called a local or simple transaction) is a series of actions that
are performed as a single logical unit of work in which either all of the actions are
performed or none of them are performed. For a transaction to commit
successfully, all of the individual resources must commit successfully. If any of
them are unsuccessful, the transaction must roll back in all of the resources. A
distributed transaction occurs across multiple independent transactional
resources.
The XA specification documents the Open Group X/Open Distributed Transaction
Processing (DTP) model, which defines how an application program uses a
transaction manager to coordinate a distributed transaction across multiple
resource managers. Any resource manager that adheres to the XA specification
can participate in a transaction coordinated by an XA-compliant transaction
manager, thereby enabling different vendors’ transactional products to work
together. All XA-compliant transactions are distributed transactions. XA supports
both single-phase and two-phase commit.
You can learn about the XA specification in the book Distributed Transaction
Processing: The XA Specification by The Open Group on the Web at:
http://www.opengroup.org/public/pubs/catalog/c193.htm
118 Using IBM WebSphere Message Broker as an ESB with WebSphere Process Server
The JMS transport nodes in WebSphere Message Broker offer different levels of
transactional support, which can be configured as a property of the node
instance depending on your particular requirements:
? Non-transacted
Messages passing through the flow are not part of any transaction. This
setting best suits non-persistent messages where high throughput is a
requirement.
? Local transactions
The individual nodes can be enabled for local transactions, which means that
each node uses a transacted JMS session to their JMS provider, so that the
messages are sent and received as part of individual transactions.
? Global transactions (XA transactions)
JMS destinations that supply messages to a JMSInput node, or receive
messages from a JMSOutput node, can be coordinated as part of a message
flow global transaction. Therefore, the whole operation that is performed by
the flow can be contained in a transaction, so that all or none of the
processing takes place, depending on the outcome of the transaction. Global
transactions are available to any JMS provider that conforms to the JMS 1.1
Useful terms:
Transaction manager
The person who coordinates the transaction that controls a
global unit of work. Must be able to communicate with all
participants within that unit of work.
Resource manager
The participants within a global unit of work. Owns and
manages resources that can be accessed and updated by
applications. Such examples are a WebSphere MQ queue
manager whose resources are its queues or a DB2 database
whose resources are its tables.
Unit of work When an application updates the resources of one or more
resource managers, it is often vital that all updates complete
successfully as a group or none of them complete. Updates
that complete this way are said to occur within a unit of work or
transaction.
Syncpoint coordinator
The computer subsystem that manages units of work. The
point in time when all updates within a unit of work are either
committed or backed out is called a
sync point.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.96.135