IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Memory Leak problem

    Posted Tue July 23, 2002 03:56 PM

    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.


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 2.  RE: Memory Leak problem

    Posted Wed July 24, 2002 08:36 AM

    With your first approach, after getting the BrokerConnection Exception, did you try explicitely setting the BrokerConnection object to null.
    This should enable the GC to get rid of it.


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Memory Leak problem

    Posted Wed July 24, 2002 07:24 PM

    Edward,

    Thanks for your suggestion. But I don’t have access to the BrokerConnection object, it gets created internally in the WM API when I try to instantiate a new BrokerServerClient. The only reason I even know the BrokerConnection objects exist is because I’m using a memory analysis program (optimizeit).

    I guess I can try setting the BrokerServerClient to null, but since it gets instantiated within the “try”, I don’t think its even getting set to anything.

    Thanks again for your response


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB