Announcement Announcement Module
No announcement yet.
Multiple config files with Spring context in multiple jars Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple config files with Spring context in multiple jars


    EhCacheManagerFactoryBean seems to accept only one file as configLocation.

    Is there any way to use many config files ?

    I would like to put ehcache config files in each jar i use according to the classes and methods that i want to cache in each jar.

    When i have 2 or more jar that define an ehcache context, only one seems to be used.

    Is this possible to do something like that with a wild card ?
    	<bean id="myModulesManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
    		<property name="configLocation" value="classpath*:*-ehcache.xml"/>
    With this class, it doesn't seem but with another ?

    Thank you for your help.


  • #2
    After looking at EhCacheManagerFactoryBean, it seems it is impossible to define many config files.

    I'm looking for writing my own factory using ClassPathXmlApplicationContext instead of resource.
    I'll make an XML merge.

    If it works, i'll post the code here.


    • #3
      I did it and It works.

      If someone needs it, i already added a post on ehcache forums :

      The source code is here :