Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client Java API Programmer's Guide | Transaction Semantics | Using Broker Transaction Clients | Operating within a Transaction | Publishing a Transaction
 
Publishing a Transaction
Use the publish method to publish a transaction. This method publishes one event with the given transaction ID. When the event is published, it is sent to the Broker. The Broker then forwards the event to all its subscribing clients.
Note that the event is processed only after the transaction is committed. The following example contains an excerpt that shows the use of the publish method.
. . .
// Define the BrokerClient to be used as a transactional client.
BrokerTransactionalClient pub;
 
// Define the event to be published
BrokerEvent e;
 
// Publish event
try {
pub.publish(e);
} catch (BrokerException ex) {
System.out.println ("Error on transactional publish" +ex);
return;
}
. . .