tomcat - MaxActive database connection parameter doesn't work -
i have problem datasource configuration.
i have tomcat 7 java 7 , quartz web application. application has datasource configured:
<resource auth="container" driverclassname="com.mysql.jdbc.driver" factory="org.apache.tomcat.dbcp.dbcp.basicdatasourcefactory" logabandoned="true" maxactive="3" maxidle="1" maxwait="10000" name="jdbc/name" password="xxxxxx" removeabandoned="true" removeabandonedtimeout="120" type="javax.sql.datasource" url="jdbc:mysql://xxxxxx:3306/xxxxx?autoreconnect=true&zerodatetimebehavior=converttonull&rewritebatchedstatements=true" username="usr" validationquery="select 1" />
with maxactive = 3 expected see no more 3 connection opened. instead of this, see new connection opened every time quartz job starts, untill 8 connection (don't know if default limit).
so seems parameter not considered, other yes, because connection database correct username, password etc... ok.
can me please?
thanks
i reply myself
it problem of factory org.apache.tomcat.dbcp.dbcp.basicdatasourcefactory
using org.apache.tomcat.dbcp.dbcp2.basicdatasourcefactory (replacing originial tomcat 7 jar) works
don't know why, works. org.apache.tomcat.dbcp.dbcp.basicdatasourcefactory if initialsize set 8, 1 instantiated. replacinig org.apache.tomcat.dbcp.dbcp2.basicdatasourcefactory, 8 instantiated
Comments
Post a Comment