Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Too many open connections from Tomcat to MySQL?

620837Oct 29 2009 — edited Nov 4 2009
<?xml version='1.0' encoding='utf-8'?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource
name="jdbc/RealmDB" auth="Container" type="javax.sql.DataSource"
username="root" password="password" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/monk"
maxActive="-1" maxIdle="5" maxWait="5000"
removeAbandoned="true" removeAbandonedTimeout="60"
testWhileIdle="true" timeBetweenEvictionRunsMillis="180000"/>
<Realm
className="org.apache.catalina.realm.DataSourceRealm"
dataSourceName="jdbc/RealmDB" localDataSource="true"
digest="MD5"
userTable="user" userNameCol="user_name" userCredCol="password"
userRoleTable="tcrole" roleNameCol="role_name" />
</Context>

Is there a way in here to auto close inactive connections after say 10 seconds? Is that the removeAbandonedTimeout or the Eviction section? Would this be better off posted on the tomcat user listing?

Edited by: TheWhiteKnight on Oct 29, 2009 8:00 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 2 2009
Added on Oct 29 2009
12 comments
1,445 views