Announcement Announcement Module
No announcement yet.
Configuring Multiple Cache Clients in a single spring bean file Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuring Multiple Cache Clients in a single spring bean file


    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="" port="8181"/>
    <gfe:client-region id="Region1" shortcut="PROXY"/>
    <gfe:client-region id="Region2" shortcut="PROXY"/>

    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?


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

    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.


    • #3
      Thanks to share this information .

      seo expert dubai |
      Last edited by smile99; Oct 29th, 2013, 04:58 AM.


      • #4
        I like Udo link. This is a correct example for this difficult. Thanks.