Databases Reference
In-Depth Information
The previous diagram shows how a one-way message is processed. The example
uses a SOAP binding example, but the request could be from another service engine
in the same or a different composite, or from an adapter. The Requestor Thread
places the message in the database and places a short notification message on a
queue and then continues to do whatever it was doing before the request. Invoker
threads (thread pools are explained later) in the BPEL engine will receive the
notification message and retrieve the message from the database and execute the
appropriate BPEL activities in the BPEL process.
Immediate execution of one-way messages in
BPEL
As previously explained, the normal behavior of the BPEL and Mediator engines
is to process a one-way message in a separate thread to the one on which it is
received. This allows the engine more control over the scheduling of the request.
However, sometimes we want our one-way message to be executed immediately
using the incoming requestor thread. In that case, we can set a property on the BPEL
component called bpel.config.oneWayDeliveryPolicy . This property has the
following values:
bpel.config.oneWayDeliveryPolicy Behavior
async.persist
Default behavior of storing message in
database.
async.cache
Stores message in memory rather than
database.
sync
Message not stored as it is processed directly
on receiving thread.
Modifying the oneWayDeliveryPolicy allows us to trade-off reliability of delivery
and coupling with the client for speed of delivery. Using the sync option offers
the best performance, but the requestor will perceive that it took longer to post
the message due to the increased coupling between the requestor and the target.
Similarly, using the async.cache option reduces the performance overhead of
storing the message in memory. However, if the server fails before the message is
processed, it will be lost as it is stored in memory. The following sections outline the
different types of threads used to process messages in the BPEL engine.
 
Search WWH ::




Custom Search