[
https://issues.apache.org/jira/browse/CAMEL-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020832#comment-13020832
]
Piotr Klimczak commented on CAMEL-3867:
---------------------------------------
Summary
All files are diffs to current trunk, where
1. camel-cache.cleanupAndLitenersRef.patch- apply to
https://svn.apache.org/repos/asf/camel/trunk/components/camel-cache
contains:
* added URI configuration option named: eventListenerRegistry which is a
ref to CacheEventListenerRegistry type
* added URI configuration option named: cacheLoaderRegistry which is a ref
to CacheLoaderRegistry type
* added unit test to test cache event listener/loader behaviour- to make
sure that referenced listeners/loaders are invoked
* cleaned up consumer and producer by moving same code do the CacheEndpoint
* removed cache stop from consumer/producer and moved to the endpoint- as I
understand the camel it will prevent removing cache when route is stopped
manually.
* added unit test to test route manual shutdown and cache being still alive
2. camel-itest-osgi.CacheRouteManagementTest.patch- osgi test of manual
managing routes (manual shutdown test using context.stopRoute).
3. camel-itest-osgi.CacheManagerFactoryRefTest.patch- simple osgi test of
referencing CacheManagerFactory and configuring ehcache using xml file.
The 2. and 3. both are optional and if you want to apply them to:
https://svn.apache.org/repos/asf/camel/trunk/tests/camel-itest-osgi
both adds osgi unit test
That's it.
But there is still one thing that puzzles me, it is:
* added URI configuration option named: cacheLoaderRegistry which is a ref to
CacheLoaderRegistry type
During writing an osgi test for jms replication i have found that the
cacheLoaderRegistry will be more usable with some more improvements.
So we have 2 options now:
a) we will wait until i will write fully working jms replication osgi unit test
(using cacheLoaders and cacheEventListeners)
b) you can apply the patch to trun and then will wait for another patch.
Decision is your. Just teake a look at the code.
> camel-cache- improve ehcache configuration by reference
> RegisteredEventListeners and CacheLoaders
> -------------------------------------------------------------------------------------------------
>
> Key: CAMEL-3867
> URL: https://issues.apache.org/jira/browse/CAMEL-3867
> Project: Camel
> Issue Type: Improvement
> Components: camel-cache
> Environment: Osgi/Spring based
> Reporter: Piotr Klimczak
> Priority: Minor
> Labels: camel-cache, ehcache, improvement, listener, replication
> Fix For: 2.8.0
>
> Attachments: camel-cache.cleanupAndLitenersRef.patch,
> camel-itest-osgi.CacheManagerFactoryRefTest.patch,
> camel-itest-osgi.CacheRouteManagementTest.patch
>
>
> The thing is, that cache names can be a dynamic list. But ehcache is
> expecting to get static list (known before start) on it's xml configuration
> file. Ehcache provides some defaults config. for new caches with some
> exceptions. One of them are cache listeners (like replication listeners).
> So the thing is, to give ability to define listeners and cache loaders (via
> spring/blueprint ref.) during endpoint construction.
> This will ease configuration of listeners/loaders as xml static list of
> listeners (per cache) will not be needed anymore. Instead of very long list
> which you have to keep up to date, you could define one list of
> listeners/loaders for all cache endpoints!
> SO SIMPLE! :)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira