应用启动时,attempting to get SockIO from uninitialized pool!

应用启动时,attempting to get SockIO from uninitialized pool!

在spring配置文件中,没有将实例名称对应上,导致mc client无法从一个未初始化的池里获取数据。

     < bean  id ="sockIOPool"  class ="com.danga.MemCached.SockIOPool"
        factory-method
="getInstance"  init-method ="initialize"  destroy-method ="shutDown"
        p:initConn
="${memcached.initConn}"
        p:minConn
="${memcached.minConn}"
        p:maxConn
="${memcached.maxConn}"
        p:maintSleep
="${memcached.maintSleep}"
        p:nagle
="${memcached.nagle}"
        p:socketTO
="${memcached.socketTO}"
        p:servers
="${memcached.servers}" >
         < constructor-arg  value ="myName" />
     </ bean >
    
     < bean  id ="memCachedClient"  class ="com.danga.MemCached.MemCachedClient" >
         < constructor-arg  value ="myName" /> 
         < property  name ="sanitizeKeys"  value ="false" />
         < property  name ="compressEnable"    value ="true" />
         < property  name ="compressThreshold"  value ="1024" />
     </ bean >

注意 < constructor-arg  value ="myName" /> 中的myName要保持一致。

你可能感兴趣的:(应用启动时,attempting to get SockIO from uninitialized pool!)