# Copyright 2001-2005 The Apache Software Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------
# $Id$
#
# This is the configuration file for Torque.
#
# Note that strings containing "," (comma) characters must backslash
# escape the comma (i.e. '\,')
#
# -------------------------------------------------------------------

torque.applicationRoot = .

# -------------------------------------------------------------------
#
#  L O G G I N G
#
# -------------------------------------------------------------------
# We use Log4J for all Torque logging and we embed the log4j
# properties within our application configuration.
# -------------------------------------------------------------------

# This first category is required and the category
# must be named 'default'. This is used for all logging
# where an explicit category is not specified.

#log4j.category.org.apache.torque = ALL, org.apache.torque
#log4j.appender.org.apache.torque = org.apache.log4j.ConsoleAppender
#log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
#log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] %-5p %c - %m%n
#log4j.appender.org.apache.torque.append = false

# -------------------------------------------------------------------
#
#  D E F A U L T S
#
# -------------------------------------------------------------------
#
# 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 SharedPoolDataSourceFactory of the PerUserDataSourceFactory
# as your data source provider. It does not work with JNDI.
#
# The example is shown for SharedPoolDataSource.
#
# -------------------------------------------------------------------

# Time to wait for a connection to the database in milliseconds.
torque.defaults.pool.maxWait = 10000

# 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.maxIdle = 8
torque.defaults.pool.maxActive = 10

# 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.apache.derby.jdbc.EmbeddedDriver
#torque.defaults.connection.driver = org.apache.derby.jdbc.ClientDriver

# Sets the URL for the datasources
torque.defaults.connection.url = jdbc:derby:workstyleDB
#torque.defaults.connection.url = jdbc:derby://localhost:1527/workstyleDB

# Sets login and password for the data sources.
torque.defaults.connection.user = workstyle
torque.defaults.connection.password = hogehhoge

# -------------------------------------------------------------------
#
#  T O R Q U E  P R O P E R T I E S
#
# -------------------------------------------------------------------
# These are your database settings. Look in the
# org.apache.torque.pool.* packages for more information.
#
# The parameters to connect to the default database.  You MUST
# configure these properly.
# -------------------------------------------------------------------

torque.database.default=workstyle
torque.database.workstyle.adapter=derby

# # Using commons-dbcp
torque.dsfactory.workstyle.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
# torque.dsfactory.workstyle.factory=org.apache.torque.dsfactory.PerUserPoolDataSourceFactory
torque.dsfactory.workstyle.pool.maxIdle=8
torque.dsfactory.workstyle.pool.maxActive=10
torque.dsfactory.workstyle.pool.testOnBorrow=true
torque.dsfactory.workstyle.pool.validationQuery=SELECT 1 FROM STATUS
torque.dsfactory.workstyle.connection.driver = org.apache.derby.jdbc.EmbeddedDriver
#torque.dsfactory.workstyle.connection.driver = org.apache.derby.jdbc.ClientDriver
torque.dsfactory.workstyle.connection.url = jdbc:derby:workstyleDB
#torque.dsfactory.workstyle.connection.url = jdbc:derby://localhost:1527/workstyleDB
torque.dsfactory.workstyle.connection.user = workstyle
torque.dsfactory.workstyle.connection.password = hogehoge


# # Using jndi
# torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory.JndiDataSourceFactory
# torque.dsfactory.bookstore.jndi.path=jdbc/bookstore
# torque.dsfactory.bookstore.jndi.java.naming.factory.initial = org.apache.naming.java.javaURLContextFactory
# torque.dsfactory.bookstore.jndi.java.naming.factory.url.pkgs = org.apache.naming

# 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.maxIdle=8
# torque.dsfactory.bookstore.datasource.maxActive=10

# # ConnectionPoolDataSource
# torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory.JndiDataSourceFactory
# torque.dsfactory.bookstore.jndi.path=jdbc/DBbookstore
# torque.dsfactory.bookstore.jndi.java.naming.factory.initial = org.apache.naming.java.javaURLContextFactory
# torque.dsfactory.bookstore.jndi.java.naming.factory.url.pkgs = org.apache.naming
# torque.dsfactory.bookstore.datasource.classname=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
# torque.dsfactory.bookstore.datasource.driver = org.gjt.mm.mysql.Driver
# torque.dsfactory.bookstore.datasource.url = jdbc:mysql://localhost:3306/torque
# torque.dsfactory.bookstore.datasource.user = user
# torque.dsfactory.bookstore.datasource.password = password

# Determines if the quantity column of the IDBroker's id_table should
# be increased automatically if requests for ids reaches a high
# volume.

torque.idbroker.clever.quantity=true

# Determines whether the managers cache instances of the business objects.
# And also whether the MethodResultCache will really cache results.

torque.manager.useCache = true
