tfischer 2005/03/19 03:00:00
Modified: src/conf Torque.properties
src/conf/master Torque.master
Log:
Replaced outdated configuration properties for the pool by valid ones.
This involved:
- replaced connectionWaitTimeout by maxWait
- replacing defaultMaxConnections by maxIdle and maxActive
- replacing maxExpiryTime by timeBetweenEvictionRunsMillis and
MinEvictableIdleTimeMillis
- removing logInterval
Revision Changes Path
1.15 +21 -16 db-torque/src/conf/Torque.properties
Index: Torque.properties
===================================================================
RCS file: /home/cvs/db-torque/src/conf/Torque.properties,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Torque.properties 24 Aug 2004 04:14:08 -0000 1.14
+++ Torque.properties 19 Mar 2005 11:00:00 -0000 1.15
@@ -38,31 +38,34 @@
#
# These values kick in, if you don't explicitly override them in your
# various database settings. At the moment they're only used if you
-# configure the TorqueDataSourceFactory of the Jdbc2PoolDataSourceFactory
+# configure the SharedPoolDataSourceFactory of the PerUserDataSourceFactory
# as your data source provider. It does not work with JNDI.
#
-# The example is shown for TorqueDataSource.
+# The example is shown for SharedPoolDataSource.
#
# -------------------------------------------------------------------
-# If > 0, then a monitoring thread is started for every pool to
-# display the number of created, available and checked out connections
-# The interval is in seconds.
-torque.defaults.pool.logInterval = 0
+# Time to wait for a connection to the database in milliseconds.
+torque.defaults.pool.maxWait = 10000
-# Time to wait for a connection to the databas in Seconds.
-torque.defaults.pool.connectionWaitTimeout = 10
-
-# Maximum number of connections cached in a database definition. Note
-# that, if you have multiple database definitions which access the
+# Maximum number of idle and active connections cached in a database
+# definition.
+# Note that, if you have multiple database definitions which access the
# same database URL, they don't share the connections but you have
# multiple pools and each has this maximum number. So if you have a
# connection licensed database engine, you must multiply this number by
# the number of times you use a specific database URL.
-torque.defaults.pool.defaultMaxConnections = 80
+torque.defaults.pool.maxIdle = 8
+torque.defaults.pool.maxActive = 10
-# Lifetime of a connection in the pool. Defaults to one hour
-torque.defaults.pool.maxExpiryTime = 3600
+# How often the pool is checked for connection which stayed in the pool
+# for too long. Defaults to 5 minutes (5 * 60 * 1000)
+# remove property if the idle object evictor should not be run
+torque.defaults.pool.timeBetweenEvictionRunsMillis= 300000
+
+# Lifetime of an idle connection in the pool in milliseconds.
+# Defaults to one hour (1000 * 60 * 60)
+torque.defaults.pool.minEvictableIdleTimeMillis = 3600000
# Sets the driver for the data sources.
torque.defaults.connection.driver = org.gjt.mm.mysql.Driver
@@ -92,6 +95,7 @@
## Using commons-dbcp
torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
#torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory.PerUserPoolDataSourceFactory
+torque.dsfactory.bookstore.pool.maxIdle=8
torque.dsfactory.bookstore.pool.maxActive=10
torque.dsfactory.bookstore.pool.testOnBorrow=true
torque.dsfactory.bookstore.pool.validationQuery=SELECT 1
@@ -110,7 +114,8 @@
#torque.dsfactory.bookstore.datasource.dataSourceName=jdbc/DBbookstore
#torque.dsfactory.bookstore.datasource.jndiEnvironment.java.naming.factory.initial
= org.apache.naming.java.javaURLContextFactory
#torque.dsfactory.bookstore.datasource.jndiEnvironment.java.naming.factory.url.pkgs
= org.apache.naming
-#torque.dsfactory.bookstore.datasource.defaultMaxConnections=10
+#torque.dsfactory.bookstore.datasource.maxIdle=8
+#torque.dsfactory.bookstore.datasource.maxActive=10
## ConnectionPoolDataSource
#torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory.JndiDataSourceFactory
1.13 +21 -16 db-torque/src/conf/master/Torque.master
Index: Torque.master
===================================================================
RCS file: /home/cvs/db-torque/src/conf/master/Torque.master,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Torque.master 24 Aug 2004 04:14:08 -0000 1.12
+++ Torque.master 19 Mar 2005 11:00:00 -0000 1.13
@@ -38,31 +38,34 @@
#
# These values kick in, if you don't explicitly override them in your
# various database settings. At the moment they're only used if you
-# configure the TorqueDataSourceFactory of the Jdbc2PoolDataSourceFactory
+# configure the SharedPoolDataSourceFactory of the PerUserDataSourceFactory
# as your data source provider. It does not work with JNDI.
#
-# The example is shown for TorqueDataSource.
+# The example is shown for SharedPoolDataSource.
#
# -------------------------------------------------------------------
-# If > 0, then a monitoring thread is started for every pool to
-# display the number of created, available and checked out connections
-# The interval is in seconds.
-torque.defaults.pool.logInterval = 0
+# Time to wait for a connection to the database in milliseconds.
+torque.defaults.pool.maxWait = 10000
-# Time to wait for a connection to the databas in Seconds.
-torque.defaults.pool.connectionWaitTimeout = 10
-
-# Maximum number of connections cached in a database definition. Note
-# that, if you have multiple database definitions which access the
+# Maximum number of idle and active connections cached in a database
+# definition.
+# Note that, if you have multiple database definitions which access the
# same database URL, they don't share the connections but you have
# multiple pools and each has this maximum number. So if you have a
# connection licensed database engine, you must multiply this number by
# the number of times you use a specific database URL.
-torque.defaults.pool.defaultMaxConnections = 80
+torque.defaults.pool.maxIdle = 8
+torque.defaults.pool.maxActive = 10
-# Lifetime of a connection in the pool. Defaults to one hour
-torque.defaults.pool.maxExpiryTime = 3600
+# How often the pool is checked for connection which stayed in the pool
+# for too long. Defaults to 5 minutes (5 * 60 * 1000)
+# remove property if the idle object evictor should not be run
+torque.defaults.pool.timeBetweenEvictionRunsMillis= 300000
+
+# Lifetime of an idle connection in the pool in milliseconds.
+# Defaults to one hour (1000 * 60 * 60)
+torque.defaults.pool.minEvictableIdleTimeMillis = 3600000
# Sets the driver for the data sources.
torque.defaults.connection.driver = @DATABASE_DRIVER@
@@ -92,6 +95,7 @@
## Using commons-dbcp
[EMAIL
PROTECTED]@.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
[EMAIL
PROTECTED]@.factory=org.apache.torque.dsfactory.PerUserPoolDataSourceFactory
[EMAIL PROTECTED]@.pool.maxIdle=8
[EMAIL PROTECTED]@.pool.maxActive=10
[EMAIL PROTECTED]@.pool.testOnBorrow=true
[EMAIL PROTECTED]@[EMAIL PROTECTED]@
@@ -110,7 +114,8 @@
[EMAIL PROTECTED]@.datasource.dataSourceName=jdbc/[EMAIL PROTECTED]@
[EMAIL PROTECTED]@.datasource.jndiEnvironment.java.naming.factory.initial =
org.apache.naming.java.javaURLContextFactory
[EMAIL PROTECTED]@.datasource.jndiEnvironment.java.naming.factory.url.pkgs =
org.apache.naming
[EMAIL PROTECTED]@.datasource.defaultMaxConnections=10
[EMAIL PROTECTED]@.datasource.maxIdle=8
[EMAIL PROTECTED]@.datasource.maxActive=10
## ConnectionPoolDataSource
[EMAIL PROTECTED]@.factory=org.apache.torque.dsfactory.JndiDataSourceFactory
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]