org.logicalcobwebs.proxool.configuration
Class PropertyConfigurator
java.lang.Object
   org.logicalcobwebs.proxool.configuration.PropertyConfigurator
org.logicalcobwebs.proxool.configuration.PropertyConfigurator
- public class PropertyConfigurator 
- extends java.lang.Object
Uses a standard Java properties file to configure Proxool. For example:
 
 jdbc-0.proxool.alias=property-test
 jdbc-0.proxool.driver-url=jdbc:hsqldb:.
 jdbc-0.proxool.driver-class=org.hsqldb.jdbcDriver
 jdbc-0.user=foo
 jdbc-0.password=bar
 jdbc-0.proxool.house-keeping-sleep-time=40000
 jdbc-0.proxool.house-keeping-test-sql=select CURRENT_DATE
 jdbc-0.proxool.maximum-connection-count=10
 jdbc-0.proxool.minimum-connection-count=3
 jdbc-0.proxool.maximum-connection-lifetime=18000000
 jdbc-0.proxool.simultaneous-build-throttle=5
 jdbc-0.proxool.recently-started-threshold=40000
 jdbc-0.proxool.overload-without-refusal-lifetime=50000
 jdbc-0.proxool.maximum-active-time=60000
 jdbc-0.proxool.verbose=true
 jdbc-0.proxool.trace=true
 jdbc-0.proxool.fatal-sql-exception=Fatal error
 jdbc-0.proxool.prototype-count=2
 jdbc-1.proxool.alias=property-test-2
 jdbc-1.proxool.driver-url=jdbc:hsqldb:.
 jdbc-1.proxool.driver-class=org.hsqldb.jdbcDriver
 jdbc-1.user=scott
 jdbc-1.password=tiger
 jdbc-1.proxool.house-keeping-sleep-time=40000
 jdbc-1.proxool.house-keeping-test-sql=select CURRENT_DATE
 jdbc-1.proxool.maximum-connection-count=10
 jdbc-1.proxool.minimum-connection-count=3
 jdbc-1.proxool.maximum-connection-lifetime=18000000
 jdbc-1.proxool.simultaneous-build-throttle=5
 jdbc-1.proxool.recently-started-threshold=40000
 jdbc-1.proxool.overload-without-refusal-lifetime=50000
 jdbc-1.proxool.maximum-active-time=60000
 jdbc-1.proxool.verbose=true
 jdbc-1.proxool.trace=true
 jdbc-1.proxool.fatal-sql-exception=Fatal error
 jdbc-1.proxool.prototype-count=2
 
 The first word (up to the first dot) must start with "jdbc", but it can
 be anything you like. Use unique names to identify each pool. Any property
 not starting with "jdbc" will be ignored.
 
 The properties prefixed with "proxool."  will be used by Proxool while
 the properties that are not prefixed will be passed on to the
 delegate JDBC driver.
 
- Since:
- Proxool 0.5
- Version:
- $Revision: 1.10 $, $Date: 2003/03/05 23:28:56 $
- Author:
- Bill Horsman (bill@logicalcobwebs.co.uk), $Author: billhorsman $ (current maintainer)
| Field Summary | 
| private static java.lang.String | DOT
 | 
| private static java.lang.String | EXAMPLE_FORMAT
 | 
| private static Log | LOG
 | 
| protected static java.lang.String | PREFIX
 | 
 
 
| Method Summary | 
| static void | configure(java.util.Properties properties)Configure proxool with the given properties.
 | 
| static void | configure(java.lang.String filename)Configure proxool with the given properties file.
 | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
LOG
private static final Log LOG
PREFIX
protected static final java.lang.String PREFIX
- See Also:
- Constant Field Values
DOT
private static final java.lang.String DOT
- See Also:
- Constant Field Values
EXAMPLE_FORMAT
private static final java.lang.String EXAMPLE_FORMAT
- See Also:
- Constant Field Values
PropertyConfigurator
public PropertyConfigurator()
configure
public static void configure(java.lang.String filename)
                      throws ProxoolException
- Configure proxool with the given properties file.
 
- 
- Parameters:
- filename- the filename of the properties file.
- Throws:
- ProxoolException- if the configuration fails.
 
configure
public static void configure(java.util.Properties properties)
                      throws ProxoolException
- Configure proxool with the given properties.
 
- 
- Parameters:
- properties- the properties instance to use.
- Throws:
- ProxoolException- if the configuration fails.