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.


#TechXchangePresenter
 View Only
  • 1.  Expiring Hash Map

    Posted Thu December 01, 2016 02:48 AM

    I am creating a java service where I am looking to create a Hash Map. However my requirement is to expire an object in that Map if not used for a while. I know there is ExpiringMap available in apache guava which I can use. Any other option to use in this situations?


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Expiring Hash Map

    Posted Thu December 01, 2016 06:39 AM

    You can make use of Ehcache that comes with Integration Server. You do not need any terracotta license just to make use of basic caching features without distributed caching.

    You can achieve the expiry feature you are looking for in Ehcache. Please refer to below link which explains on how to programmatically create and use caches without the need of XML configuration file


    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Expiring Hash Map

    Posted Thu December 01, 2016 06:43 AM

    I need to maintain many hash maps is my solution. Means my requirement do not allow me to uses singleton. Does this mean I need to create separate cache dynamically on demand?


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Expiring Hash Map

    Posted Thu December 01, 2016 06:59 AM

    Yes, Farid. You have to create cache dynamically on demand. You have to treat the cache creation as hashmap creation and make use of it.


    #Integration-Server-and-ESB
    #webMethods