Home > JAVA > Konfigurasi Tomcat 7 Connection Pool

Konfigurasi Tomcat 7 Connection Pool

Berikut ini merupakan konfigurasi tomcat yang saya gunakan untuk aplikasi logistik di tingkat production. Saya meletakannya di context.xml pada aplikasi.


<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource name="jdbc/logis"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
username="sa"
password="admin1234"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://127.0.0.1:1433;databaseName=LOGISPRODFERA"
testWhileIdle="true"
testOnBorrow="true"
testOnReturn="false"
timeBetweenEvictionRunsMillis="5000"
maxActive="100"
minIdle="10"
maxWait="10000"
initialSize="10"
removeAbandonedTimeout="60"
removeAbandoned="true"
logAbandoned="true"
minEvictableIdleTimeMillis="30000"
jmxEnabled="true"
jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;
org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer;
org.apache.tomcat.jdbc.pool.interceptor.SlowQueryReportJmx(threshold=10000)"/>
</Context>

Sumber 1
Sumber 2
Sumber 3

Categories: JAVA
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: