16. April 2007

DataSources unter Tomcat 6

In Tomcat 6 gibt es zur Definition von DataSources keine <ResourceParams> mehr wie unter 4.x und 5.x. Sie werden nun wie folgt definiert:

<Resource name="jdbc/MYDATASOURCE"
scope="Shareable"
type="javax.sql.DataSource"
auth="Container"
url="jdbc:db2:dbinst"
maxIdle="10"
maxOpenPreparedStatements="50"
maxActive="50"
validationQuery="Select xxx from yyy FETCH FIRST 1 ROWS ONLY FOR FETCH ONLY"
testWhileIdle="true"
timeBetweenEvictionRunsMillis="600000"
driverClassName="COM.ibm.db2.jdbc.app.DB2Driver"
maxWait="10000"
username="myuser"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
poolPreparedStatements="true"
password="hispass"
removeAbandoned="true"
removeAbandonedTimeout="180"
logAbandoned="true"
/>

Keine Kommentare: