0
我正在使用win7-eclipse-tomcat7-mysql5。在TOMCAT_DIRECTORY/conf目录DataSource maxActive不会在tomcat中更改mysql
首先,设置数据源资源/ context.xml的
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource name="jdbc/TestDB" auth="Container"
type="javax.sql.DataSource"
maxActive=100 maxIdle="30" maxWait="10000"
username="dev_id" password="dev_password"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/my_db_name" />
</Context>
而且在Eclipse/MY_PROJECT /的WebContent/WEB-INF/web.xml中
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/TestDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
设立后,我运行我的eclipse tomcat 7.0服务器。
然后在jconsole中找到maxActive。
为什么maxActive不能改变?救救我,请....