Broker 10.5 | webMethods Broker Documentation | webMethods Broker Administration Java API Programmer’s Guide | Managing Broker Clients | Broker Administration | Destroying a Broker
 
Destroying a Broker
You can use the BrokerAdminClient.destroyBroker method to destroy the Broker to which your BrokerAdminClient is connected. Your client must have permission to destroy the Broker. Destroying the Broker will also destroy your BrokerAdminClient.
The following example illustrates how to destroy a Broker:
. . .
BrokerAdminClient c;
try {
/* Create a Broker Admin client */
c = new BrokerAdminClient(broker_host, broker_name, null,
"admin", "My_Broker_Monitor");
 
/* Destroy a Broker */
c.destroyBroker( "My_Broker");
...
} catch (BrokerException ex) {
System.out.println("Error destroying Broker\n"+ex);
return;
}
. . .