WebMethods - Get Broker client groups in Java

by
Jeremy Canfield |
Updated: February 09 2023
| WebMethods articles
This assumes you are able to connect to WebMethods Broker Server in Java.
Here is an example class that can be used to get the Broker client groups for the Broker client on server1.example.com.
import COM.activesw.api.client.*;
public class Main {
public static void main(String[] args) {
try {
BrokerAdminClient admin_client = new BrokerAdminClient("server1.example.com", null, null, "admin", "WebMethods Admin Client", null);
System.out.println(admin_client);
String[] getClientGroupNames = admin_client.getClientGroupNames();
for (String group : getClientGroupNames) {
BrokerClientGroupInfo getClientGroupInfo = admin_client.getClientGroupInfo(group);
System.out.println(getClientGroupInfo);
}
} catch (BrokerException ex) {
System.out.println("Caught the following exception: " + ex);
}
}
}
If the request is successful, something like this should be returned.
BrokerServerClient:
broker_host=server1.example.com
broker_port=6849
clientgroup "admin" {
description = "System defined.";
lifeCycle = DestroyOnDisconnect;
storageType = Volatile;
requiredEncryption = None;
accessLabelRequired = false;
}
clientgroup "adapters" {
description = "System defined.";
lifeCycle = DestroyOnDisconnect;
storageType = Volatile;
requiredEncryption = None;
accessLabelRequired = false;
}
clientgroup "accessLabelAdapter" {
description = "System defined.";
lifeCycle = DestroyOnDisconnect;
storageType = Volatile;
requiredEncryption = None;
accessLabelRequired = false;
}
clientgroup "eventLog" {
description = "";
lifeCycle = ExplicitDestroy;
storageType = Persistent;
requiredEncryption = None;
accessLabelRequired = false;
}
clientgroup "IS-JMS" {
description = "Predefined";
lifeCycle = ExplicitDestroy;
storageType = Guaranteed;
requiredEncryption = None;
accessLabelRequired = false;
}
clientgroup "JMSClient" {
description = "";
lifeCycle = ExplicitDestroy;
storageType = Guaranteed;
requiredEncryption = None;
accessLabelRequired = false;
}
clientgroup "WmJmsNamingReader" {
description = "Predefined";
lifeCycle = ExplicitDestroy;
storageType = Guaranteed;
requiredEncryption = None;
accessLabelRequired = false;
}
clientgroup "EventMembers" {
description = "Predefined";
lifeCycle = ExplicitDestroy;
storageType = Guaranteed;
requiredEncryption = None;
accessLabelRequired = false;
}
clientgroup "IntegrationServer" {
description = "";
lifeCycle = ExplicitDestroy;
storageType = Guaranteed;
requiredEncryption = None;
accessLabelRequired = false;
}
clientgroup "analysis" {
description = "";
lifeCycle = DestroyOnDisconnect;
storageType = Volatile;
requiredEncryption = None;
accessLabelRequired = false;
}
Did you find this article helpful?
If so, consider buying me a coffee over at