I am having a problem where I am getting a memory leak when trying to use the webMethods Java admin API. I am writing a Java program to pull information out of broker server clients via the API.
Since the broker server may be down when I first attempt to grab that information, my program tests first to see if the server is available. I do this by attempting to instantiate a BrokerServerClient and catch the resulting BrokerCommunicationFailureException if the connection failed. This resulted in many instances of BrokerConnection objects that never get cleaned up by Java garbage collection.
Taking a different approach, I then tried to use BrokerServerClient.getServerProcessRunStatus().
With both approaches, a BrokerConnection object is apparently created and tracked internally, so that if the server remains unreachable it is never garbage collected and results in a memory leak.
Anybody have any suggestions? Thanks in advance.