WebMethods - Get Broker client info 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 info 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);
BrokerClientInfo getClientInfo = admin_client.getClientInfo();
System.out.println("getClientInfo = " + getClientInfo);
} 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
getClientInfo = client "#vclient329-757" {
clientGroup = "admin";
appName = "WebMethods Admin Client";
canShareState = false;
stateShareLimit = 1;
sharedEventOrdering = Publisher;
priorityOrdering = false;
forcedReconnect = false;
ackVolatile = false;
clientStorage = Volatile;
clientLifecycle = DestroyOnDisconnect;
highPubSeqn = 0;
};
Did you find this article helpful?
If so, consider buying me a coffee over at