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.  How to clear the HashMap in wM?

    Posted Tue January 19, 2010 06:30 AM

    Hi All,

    Is there a way to clear the HashMap in single shot?

    In Java we have clear() method. In wM we have remove() method in PSUtilities2_3 package which we can modify to use for HashMap.

    Tried assigning HashMap = null; but it didn’t work out. Still the size of HashMap is > 0.

    Any guess.

    Regards,
    Sam.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: How to clear the HashMap in wM?

    Posted Tue January 19, 2010 03:27 PM

    Sam,
    One thing is not clear to me, i.e. HashMap is a class of Java. If you are implementing in WM using Java program then same clear() method can be used. So what different you are trying?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: How to clear the HashMap in wM?

    Posted Tue January 19, 2010 05:23 PM

    A common practice is to not use the PSUtilities services directly. Rather, copy them to your own package to insulate them from future PSUtilities updates. The reason to do this is PSUtilities is not an official wM package and is not supported. They do not guarantee that subsequent releases will not change the behavior of services.

    Write your own Java service that accepts a hashmap as the input object and call clear.

    Or, just drop the hashmap object from the pipeline and then create a new one for whatever you’re doing.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: How to clear the HashMap in wM?

    Posted Thu January 21, 2010 10:21 AM

    Hi Vikas,

    wM didn’t provide any services for HashMap/Hashtable. We are using PSUtilities as Rob told. But, in PSUtilities didn’t find service for clear(), but we have remove method which removes one by one.

    Rob,
    Yes we are placing the service in our own package as you told, instead using from PSUtil package. Yes, at last we are doing by dropping HashMap object from pipeline.

    Thank you all.

    Regards,
    Sam.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services