0

I'm developing a Spring MVC application, and I'd like to set up caching using Simple Spring Memcached (SSM) with a Couchbase backend.

I have setup a working couchbase install locally, with a memcache bucket "default". I can connect and use the Couchbase Java API in a test project.

However, when using the SSM annotations within my Spring MVC project I get timeout exceptions. I'm fairly confident that the issue lies with my SSM configuration:

<bean name="defaultMemcachedClient" class="com.google.code.ssm.CacheFactory">
    <property name="cacheClientFactory">
        <bean name="cacheClientFactory" class="com.google.code.ssm.providers.spymemcached.MemcacheClientFactoryImpl" />
    </property>
    <property name="addressProvider">
        <bean class="com.google.code.ssm.config.DefaultAddressProvider">
            <property name="address" value="127.0.0.1:8091" />
        </bean>
    </property>
    <property name="configuration">
        <bean class="com.google.code.ssm.providers.CacheConfiguration">
            <property name="consistentHashing" value="true" />
        </bean>
    </property>
</bean>

Notice it makes no mention of the "default" bucket, or of any authentication parameters. I haven't been able to find any documentation on how to configure SSM to work with specific couchbase buckets in this way.

Any help?

ragnor
  • 2,498
  • 1
  • 22
  • 25
Clavicle
  • 152
  • 1
  • 10

1 Answers1

1

If you are only using the SSM (Memcached) you need to connect to the memcached port, which is 11211 instead of 8091.

scalabl3
  • 1,273
  • 6
  • 7
  • 1
    Port 8091 is the admin/config port, you can get cluster configuration from that port (http). Port 8092 is for Map/Reduce View querying (http). Port 11211 is the memcached port for binary operations (binary socket). – scalabl3 Aug 15 '13 at 01:33
  • Thanks scalabl3. That fixed the problem. Looks like I need a more thorough read through of the couchbase docs. – Clavicle Aug 15 '13 at 13:00
  • No problem! Hit me up anytime on twitter if you need anything else that doesn't fit into an SO question @scalabl3 – scalabl3 Aug 15 '13 at 15:01