When the adapter signals that it has completed delivery,the transaction manager
will then call end,prepare, and committo complete the requirements
outlined in the XA transaction protocol. When the preparecallis made, the XA
implementation will call setTransactionIDonthe eventPersistance
implementation; the eventPersistance implementation will store the transaction XID
in the event table. When the commitcall is made, the XA implementation will
call updateEventStatuson the eventPersistance implementation to set the status
in the event table to COMMITED. This is done for every event that was
retrieved. After all events have been delivered and successfully marked
COMMITTED.
When the event is created at the EIS end, configured adapterListener gets notified
and it in turn instantiates CallbackEventSender. HereadapterListener decides
which method to invoke out of the four defined. Lets consider the adapter calls
sendEventWithNoReturn() as shown in the sequence diagram.
Once the program control gets into CallbackEventSender,it checks how many
EndpointFactories are configured for the current instance of adapter.If there is
more than one, then it delivers the event by creating endpoints for each of them
and invoking either onNotification or onMessage method on the endpoint with out
any XA transaction. Finally it would call release() method on the end point to free
the endpoint hence the application server can add it to endpoint pool.
Also it invokes beforeDelivery() and afterDelivery() methods on the endpoint as
defined by the JCA functional specification.
XA transaction will come into picture only when the adapter is configuredwith
ONE EndpointFactory.The following sequence diagram depicts the callback event
processing for event delivery with XA transaction.
WebSphereAdapter development overview 95