Broker 10.5 | webMethods Broker Documentation | webMethods Broker Administration Java API Programmer’s Guide | Managing Client Groups | Creating and Destroying Client Groups
 
Creating and Destroying Client Groups
 
Life Cycle
Storage Type
Setting Client Group Descriptions
Destroying Client Groups
You can use the BrokerAdminClient.createClientGroup method to create a client group for the Broker to which your BrokerAdminClient is connected. When creating a client group, you must specify the following:
*The Broker client group's name. For information on client group name restrictions, see the webMethods Broker Client Java API Programmer’s Guide.
*The life cycle of the Broker client belonging to the group; see Life Cycle.
*The queue storage type for the Broker clients belonging to this group; see Storage Type.
The following example illustrates how you can create a client group using the BrokerAdminClient class.
. . .
BrokerAdminClient c;
try {
/* Create a Broker admin client */
c = new BrokerAdminClient(broker_host, broker_name, null,
client_group, "My Broker Monitor",null);
/* Create a client group */
c.createClientGroup(“myGroup”,
BrokerAdminClient.LIFECYCLE_DESTROY_ON_DISCONNECT,
BrokerTypeDef.STORAGE_GUARANTEED);
} catch (BrokerException ex) {
System.out.println("Error while creating client group\n"+ex);
return;
}
. . .
The BrokerAdminClient.setEventTypesAndClientGroups method can also be used to set event types as well as client groups for a Broker.