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

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

    Comment


    • #3
      Thanks to share this information .








      -
      seo expert dubai | www.howtomakecookies.net/
      Last edited by smile99; Oct 29th, 2013, 05:58 AM.

      Comment


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

        Comment

        Working...
        X