hi,guys,

now i met one error below,i don't know what issue is,anybody can help
me?

ERROR com.schooner.MemCached.SchoonerSockIOPool - attempting to get
SockIO from uninitialized pool!

the configuration is

<bean id="memcachedPool" class="com.danga.MemCached.SockIOPool"
factory-method="getInstance"
        init-method="initialize" destroy-method="shutDown">
        <constructor-arg>
            <value>neeaMemcachedPool</value>
        </constructor-arg>
        <property name="servers">
            <list>
                <value>127.0.0.1:11211</value>
            </list>
        </property>
        <property name="initConn">
            <value>20</value>
        </property>
        <property name="minConn">
            <value>10</value>
        </property>
        <property name="maxConn">
            <value>50</value>
        </property>
        <property name="maintSleep">
            <value>30</value>
        </property>
        <property name="nagle">
            <value>false</value>
        </property>
        <property name="socketTO">
            <value>3000</value>
        </property>
    </bean>
    <bean id="memcachedClient"
class="com.danga.MemCached.MemCachedClient">
        <constructor-arg>
            <value>neeaMemcachedPool</value>
        </constructor-arg>

    </bean>


and java code is

import org.springframework.context.ApplicationContext;
import
org.springframework.context.support.FileSystemXmlApplicationContext;

import com.danga.MemCached.MemCachedClient;

public class MClient {

        public static void main(String[] args) {

                ApplicationContext ctx = new FileSystemXmlApplicationContext(
                                
"/WebRoot/WEB-INF/classes/config/application-context.xml");

                MemCachedClient mc = (MemCachedClient)
ctx.getBean("memcachedClient");
                for (int i = 0; i < 100; i++) {
                        // try{Thread.sleep(2000);}catch(Exception e){}
                        mc.set("key" + i, "value" + i);
                }
                try {
                        Thread.sleep(5000);
                } catch (Exception e) {
                }
                for (int i = 0; i < 100; i++) {
                        System.out.println("get " + i + " value " + 
mc.get("key" + i));
                }
        }

}

thanks for attention.

Reply via email to