Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-3686

Allow to share cache between bundles, and only clear cache when no more bundles access that cache

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.4.0
    • Future
    • camel-cache
    • None
    • camel-cache 2.4.0-fuse-01-00

    Description

      I am using camel-cache component in serviceMix. Cache endpoint uri is
      "cache://elements?maxElementsInMemory=2&memoryStoreEvictionPolicy=MemoryStoreEvictionPolicy.FIFO&overflowToDisk=false&eternal=false&timeToLiveSeconds=800"

      I have 2 bundles (core.jar, services.jar). Inside those bundles I use

      @EndpointInject(uri = Constants.CACHE_URI)
      ProducerTemplate cacheTemplate;

      cacheTemplate.requestBodyAndHeaders(...)

      core.jar puts and reads elements from cache.
      services.jar only reads elements from cache.

      After deploying both bundles it works fine, but if i uninstall services.jar, cache is "destroyed". core.jar (and all others) can't put objects into cache anymore.

      How could I make all bundles to "share" the same cache?

      Attachments

        1. camel-cache.sharedCacheManagerFactory.patch
          25 kB
          Piotr Klimczak
        2. diff.txt
          2 kB
          Justas Samuolis
        3. camel-cache.zip
          48 kB
          Justas Samuolis

        Activity

          People

            Unassigned Unassigned
            justas Justas Samuolis
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: