Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client Java API Programmer's Guide | Transaction Semantics | Using Broker Transaction Clients | Operating within a Transaction | Delivering a Transaction
 
Delivering a Transaction
To deliver a single event in one given transaction, use the deliver method. To deliver multiple events in one given transaction, use the deliver method. These methods send one event or multiple events to the Broker that will forward the events to the Client of the specified Client ID.
These methods require the following parameters:
*dest_id. The client identifier of the Broker client that is to receive the events.
*event(s). The BrokerEvent object or the array of BrokerEvent objects to be delivered.
Note that the event is processed only after the transaction is committed.
The following example contains an excerpt that shows the use of the deliver method for delivering a single event in one given transaction.
. . .
// Do transacted Deliver
static String subid = "Sub";
static String destid = "Sub";
 
for (int i=0; i<count; i++) {
try {
pub.deliver (destid, e);
} catch (BrokerException ex) {
System.out.println ("FAIL TEST-A Error on tx deliver" +ex);
return;
}
}
. . .