proxool与Spring集成配置

spring数据源连接池:ProxoolDataSource

    具体properties 如下:

 

    private String alias;
    private String driver;
    private String fatalSqlExceptionWrapperClass;
    private long houseKeepingSleepTime;
    private String houseKeepingTestSql;
    private long maximumActiveTime;
    private int maximumConnectionCount;
    private long maximumConnectionLifetime;;
    private int minimumConnectionCount;
    private long overloadWithoutRefusalLifetime;
    private String password;
    private int prototypeCount;
    private long recentlyStartedThreshold;
    private int simultaneousBuildThrottle;
    private String statistics;
    private String statisticsLogLevel;
    private boolean trace;
    private String driverUrl;
    private String user;
    private boolean verbose;
    private boolean jmx;
    private String jmxAgentId;
    private boolean testBeforeUse;
    private boolean testAfterUse;

 

spring配置如下:

	<bean id="dataSource"
		class="org.logicalcobwebs.proxool.ProxoolDataSource">
		<property name="alias" value="proxoolpool"></property>
		<property name="delegateProperties">
			<value>
				user=${jdbc.username},password=${jdbc.password}
			</value>
		</property>
		<property name="user" value="${jdbc.username}" />
		<property name="password" value="${jdbc.password}" />
		<property name="driver" value="${jdbc.driverClassName}" />
		<property name="driverUrl" value="${jdbc.url}" />
		<property name="trace">
			<value>true</value>
		</property>
		<property name="maximumConnectionCount">
			<value>100</value>
		</property>
		<property name="prototypeCount">
			<value>5</value>
		</property>
		<property name="houseKeepingTestSql"
			value="select 1 from dual" />
	</bean>

 

你可能感兴趣的:(proxool)