Commits

Ning Sun committed bee24da

update memcache provider

Comments (0)

Files changed (2)

 		<dependency>
 			<groupId>spy</groupId>
 			<artifactId>memcached</artifactId>
-			<version>2.3.1</version>
+			<version>2.5</version>
 		</dependency>
 		
 		<dependency>
 		</repository-->
 		<repository>
 			<id>memcached</id>
-			<url>http://developer.jasig.org/repo/content/groups/m2-legacy</url>
+			<url>http://bleu.west.spy.net/~dustin/m2repo/</url>
 		</repository>
 	</repositories>
 

src/main/java/info/sunng/yan/session/cache/memcache/MemcachedCaptchaSession.java

 
 import net.spy.memcached.AddrUtil;
 import net.spy.memcached.MemcachedClient;
+import net.spy.memcached.DefaultConnectionFactory;
 import org.apache.log4j.Logger;
 
 import info.sunng.yan.GlobalConfiguration;
 
     }
 
-    protected void init() throws IOException{
-        memcache  = new MemcachedClient(AddrUtil.getAddresses(
-                GlobalConfiguration.get("yan.mc.host")));
+    private void init() throws IOException{
+        memcache  = new MemcachedClient(new DefaultConnectionFactory(),
+                AddrUtil.getAddresses(GlobalConfiguration.get("yan.mc.host")));
         
     }