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

  • Multiple config files with Spring context in multiple jars

    Hello,

    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 ?
    Code:
    	<bean id="myModulesManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
    		<property name="configLocation" value="classpath*:*-ehcache.xml"/>
    	</bean>
    With this class, it doesn't seem but with another ?

    Thank you for your help.

    Pierre

  • #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.

    Comment


    • #3
      I did it and It works.

      If someone needs it, i already added a post on ehcache forums :
      http://forums.terracotta.org/forums/...618.page#27960

      The source code is here :
      http://itcb.svn.sourceforge.net/view...b-cache/trunk/

      Comment

      Working...
      X