Results 1 to 2 of 2

Thread: Configuring Multiple Cache Clients in a single spring bean file

  1. #1

    Question Configuring Multiple Cache Clients in a single spring bean file

    Hello,

    I have a class which consists of multiple cache clients. Something like this:

    private Map<String, CacheClient> cacheClients;

    The cache clients may be configured in such a way that the above map will hold multiple cache client configurations.

    How will my XML bean for the above attribute look like?

    Basically, I want to achive something like this:

    <bean class="com.gemstone.gemfire.cache.client.ClientCac he" id="MyGemfire1Ref">
    <gfe:client-cache id="MyGemfire1" pool-name="MyGemfire1Pool" />
    <gfeool id="MyGemfire1Pool" subscription-enabled="true">
    <gfe:locator host="gfr-wm-cache-1.vmware.com" port="8181"/>
    </gfeool>
    <gfe:client-region id="Region1" shortcut="PROXY"/>
    <gfe:client-region id="Region2" shortcut="PROXY"/>
    </bean>

    The above bean definition is not working as its giving the following error:

    Configuration problem: Cannot locate BeanDefinitionDecorator for element [client-cache]

    Can you please help me out?

    Regards,
    Abhijit

  2. #2
    Join Date
    Jan 2012
    Posts
    5

    Default

    Hi Abhijit,

    I'm trying to understand what you are trying to achieve.

    It looks like you are trying to mimic the cache.xml configuration by using Spring Beans. This is not going to work and I suggest looking at the configuration examples here. http://static.springsource.org/sprin...eference/html/

    If you are trying to have multiple Connection pools configured for the different Distributed systems you are trying to connect to.

    But I think the first place I would start is to follow the example configuration from the link and then make it more complicated.

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
  •