日期:2014-05-16  浏览次数:20472 次

ProxoolDataSource做连接池时出现的问题
<bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
		<property name="alias" value="db.proxool"></property>
		<property name="driver" value="${db.driver}"></property>
		<property name="driverUrl" value="${db.url}"></property>
		<property name="user" value="${db.user}"></property>
		<property name="password" value="${db.password}"></property>
		<property name="maximumActiveTime" 
                      value="${db.maximumActiveTime}"></property>
		<property name="maximumConnectionLifetime" 
                  value="${db.maximumConnectionLifetime}"></property>
		<property name="maximumConnectionCount" value="20" />
		<property name="houseKeepingTestSql">
            <value>select 1 from dual</value>
        </property>
        <property name="testBeforeUse" value="true"></property>

	</bean>

db.properties如下:

db.driver=oracle.jdbc.driver.OracleDriver
db.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
db.user=xx
db.password=xx
db.maximumConnectionLifetime=36000000
db.maximumActiveTime=36000000
一直报坑爹的?? 数据库连接 java.sql.SQLException: 调用中无效的参数异常

后来发现

??? 配置里面的

<property name="user" value="${db.user}"></property>
		<property name="password" value="${db.password}"></property>

?? 这两个配置是没用的

?? 用户名密码要写在url里:

?? db.url=jdbc:oracle:thin:xx/xx@127.0.0.1:1521:orcl

?? c a

?