# ------------------------------------------------------------------- # $Id$ # # This is the configuration file for Torque. # # Note that strings containing "," (comma) characters must backslash # escape the comma (i.e. '\,') # # ------------------------------------------------------------------- torque.applicationRoot = bin/torque/torque # ------------------------------------------------------------------- # # L O G G I N G # # ------------------------------------------------------------------- # We use Log4J for all Torque logging and we embed the log4j # properties within our application configuration. # # NOTE: # The presence of ${applicationRoot} in the logging configuration # is not a mistake. Internally the value of ${applicationRoot} # is set so that you can use it with standard log4j # properties to get logs to appear in your # application space. # ------------------------------------------------------------------- # 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.FileAppender log4j.appender.org.apache.torque.file = ${applicationRoot}/logs/torque.log 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 # This category is used in the BasePeer class. All # SQL generated will be logged if the category # priority is set to DEBUG log4j.category.sql = DEBUG, sql log4j.appender.sql = org.apache.log4j.FileAppender log4j.appender.sql.file = ${applicationRoot}/logs/sql.log log4j.appender.sql.layout = org.apache.log4j.PatternLayout log4j.appender.sql.layout.conversionPattern = %d [%t] %-5p %c - %m%n log4j.appender.sql.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 TorqueDataSourceFactory of the Jdbc2PoolDataSourceFactory # as your data source provider. It does not work with JNDI. # # The example is shown for TorqueDataSource. # # ------------------------------------------------------------------- # 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 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 # 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 # Lifetime of a connection in the pool. Defaults to one hour torque.defaults.pool.maxExpiryTime = 3600 # Sets the driver for the data sources. torque.defaults.connection.driver = org.postgresql.Driver # Sets the URL for the datasources torque.defaults.connection.url = jdbc:postgresql://localhost:5432/bookstore # Sets login and password for the data sources. torque.defaults.connection.user = torque.defaults.connection.password = # ------------------------------------------------------------------- # # 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=bookstore torque.database.bookstore.driver = org.postgresql.Driver torque.database.bookstore.url = jdbc:postgresql://localhost:5432/bookstore torque.database.bookstore.user = torque.database.bookstore.password = # The number of database connections to cache per ConnectionPool # instance (specified per database). torque.database.default.maxConnections=80 # The amount of time (in seconds) that database connections will be # cached (specified per database). # # Default: one hour = 60 * 60 seconds torque.database.default.expiryTime=3600 # The amount of time (in seconds) a connection request will have to wait # before a time out occurs and an error is thrown. # # Default: ten seconds torque.database.default.connectionWaitTimeout=10 # The interval (in seconds) between which the PoolBrokerService logs # the status of it's ConnectionPools. # # Default: No logging = 0 torque.database.logInterval=0 # 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