You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Piotr Klimczak (JIRA)" <ji...@apache.org> on 2011/05/05 21:05:03 UTC

[jira] [Issue Comment Edited] (CAMEL-3686) Allow to share cache between bundles, and only clear cache when no more bundles access that cache

    [ https://issues.apache.org/jira/browse/CAMEL-3686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029498#comment-13029498 ] 

Piotr Klimczak edited comment on CAMEL-3686 at 5/5/11 7:04 PM:
---------------------------------------------------------------

I have found one problem in my solution: the CacheEndpoint will delete the cache from CacheManager during endpoint/context/bundle shutdown.
So this have to be fixed to let my solution to work.

Will fix it soon :)

      was (Author: nannou9):
    If this solve your problem we could think about closing this improvement as invalid. What do you think about it?
  
> Allow to share cache between bundles, and only clear cache when no more bundles access that cache
> -------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3686
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3686
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.4.0
>         Environment: camel-cache 2.4.0-fuse-01-00
>            Reporter: Justas
>             Fix For: 2.8.0
>
>         Attachments: camel-cache.zip, diff.txt
>
>
> 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? 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira