Results 1 to 3 of 3

Thread: Multiple config files with Spring context in multiple jars

  1. #1
    Join Date
    Jun 2011
    Posts
    23

    Default 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. #2
    Join Date
    Jun 2011
    Posts
    23

    Default

    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. #3
    Join Date
    Jun 2011
    Posts
    23

    Default

    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/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •