memCached的配置文件 配置

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

xmlns:p="http://www.springframework.org/schema/p"

xmlns:context="http://www.springframework.org/schema/context"

xsi:schemaLocation="

http://www.springframework.org/schema/beans 

http://www.springframework.org/schema/beans/spring-beans-3.0.xsd

http://www.springframework.org/schema/context   

            http://www.springframework.org/schema/context/spring-context-3.0.xsd

    ">

    <context:component-scan base-package="com.ibs.gbplatform.common.memcached" />

    

<bean id="memCachedPool" class="com.whalin.memcached.SockIOPool"

factory-method="getInstance" init-method="initialize" destroy-method="shutDown">

<constructor-arg>

<value>memCachedPool</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>3000</value>

</property>


<property name="nagle">

<value>false</value>

</property>


<property name="socketTO">

<value>3000</value>

</property>

</bean>


<bean id="memCachedClient" class="com.whalin.memcached.MemCachedClient">

<constructor-arg>

<value>memCachedPool</value>

</constructor-arg>

</bean>

</beans>


本文出自 “贾小仙” 博客,请务必保留此出处http://hackerxian.blog.51cto.com/9240575/1608490

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。