Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client Java API Programmer's Guide | Using Broker Clients | Disconnecting and Reconnecting | Disconnecting a Broker Client
 
Disconnecting a Broker Client
You disconnect your Broker client by calling the BrokerClient.disconnect method, as shown in the following example. If the Broker client's life cycle is destroy-on-disconnect, the client state and event queue storage will be destroyed by the Broker. If the Broker client's life cycle is explicit-destroy, the client state and event queue storage will be preserved by the Broker until the Broker client reconnects.
. . .
BrokerClient c;
. . .
try {
c.disconnect();
} catch (BrokerException ex) {
System.out.println("Error on client disconnect\n"+ex);
return;
}
. . .