We have migrated from 4.6 Enterprise to Integration Server 6.0. However we are facing problems with certain services such as getBrokerName, getBrokerHost . In 6, they are a part of the WmBrokerAdmin package , however its API’s have not been exposed. Though they have provided with the BrokerClient class (refer to webMethods Broker Client Java API Programmers Guide.pdf), which contains the getBrokerName and getBrokerHost methods, the BrokerClient constructor itself requires the broker host and broker name apart from client group etc.
//Get Broker connection parameters from the IS configuration.
BrokerTransportFactory transFac =
(BrokerTransportFactory)CommsFactory.getFactory(
BrokerTransportFactory.FACTORY_TYPE);
String brokerHost = transFac.getBrokerHost();
String brokerName = transFac.getBrokerName();
String clientGroup = transFac.getClientGroup();
String clientPrefix = Configurator.getClientPrefix();
The client group/prefix is what the IS uses when creating triggers and other broker clients for internal use. You may or may not want to use those values depending on what your code is trying to do.
Thanks for the example. I tried it in a java service and it worked!
I then started looking for the documentation in wm for this and I can’t seem to find it. I looked in brokerRoot/doc and in isRoot/doc for the javaDoc files for these classes. I also searched advantage for “BrokerTransportFactory” and found only references to the message reference and a couple of obscure KB articles. Am I not looking in the right places, or is this just an “undocumented feature”?
Thanks Skip! that worked perfectly!Really appreciate your quick and accurate response!!
Especially since like Roger says…seems to be an undocumented feature!
Thanks Skip! that worked perfectly!Really appreciate your quick and accurate response!!
Especially since like Roger says…seems to be an undocumented feature!