Databases Reference
In-Depth Information
Instrumenting BPEL and SCA
Having defined the data we wish to capture in BAM, we now need to make our
auction process generate appropriate events. We can instrument BPEL and SCA by
making explicit calls to a BAM adapter as we would to any other adapter. Within
BPEL, we may also take advantage of the sensor framework to raise BAM events
from within an activity.
Sensors versus explicit calls
Explicit calls are available within both SCA and BPEL. Within BPEL, they
make it more obvious where the BAM events are being generated. BPEL
sensors, however, provide the ability to generate events at a finer grained
level than explicit calls. For example, a BAM sensor in a BPEL activity
could be set to fire not just on activation and completion (which could be
captured by an explicit call just before and after the event), but also on
events that are harder to catch with an explicit invoke, such as faults and
compensation. Finally, sensors can fire on retry events that are impossible
to capture in any other way. BAM sensors do not use partner links or
references, but refer to the adapter JNDI location directly.
Sensors are not part of the normal BPEL executable flow. They can be thought of as
event generators. They are attached to almost any kind of activity in BPEL, including
partner link operations (invoke, receive, reply) and assigns. They can also be
attached to variables and will fire whenever the variable is modified.
Invoking the BAM adapter as a regular service
When using the BAM adapter, we first need to configure an adapter instance.
Creating a BAM adapter
Let us start by creating a new BAM adapter. We begin by creating a new BAM
Connection from the Connection section of the New Gallery ( File | New , and
then select Connection under General ).
 
Search WWH ::




Custom Search