public class DBCPConnectionFactory extends AbstractConnectionFactory
Modifier and Type | Field and Description |
---|---|
protected DataSource |
datasource |
static int |
DEFAULT_IDLE_TIMEOUT |
static int |
DEFAULT_MAX_ACTIVE |
static int |
DEFAULT_MAX_IDLE |
static int |
DEFAULT_MIN_IDLE |
static boolean |
DEFAULT_SOFT_MAXIMUM |
static int |
DEFAULT_USER_TIMEOUT |
protected int |
defaultTransactionIsolation |
static String |
EXHAUSED_BLOCK |
static String |
EXHAUSED_FAIL |
static String |
EXHAUSED_GROW |
static String |
EXHAUSTED_ACTION |
static String |
IDLE_TIMEOUT |
static String |
MAX_ACTIVE |
static String |
MAX_IDLE |
static String |
MIN_IDLE |
protected net.ontopia.persistence.proxy.DBCPConnectionFactory.TraceablePoolableConnectionFactory |
pcfactory |
protected org.apache.commons.dbcp.AbandonedObjectPool |
pool |
static String |
POOL_STATEMENTS |
protected boolean |
readOnly |
static String |
ROOT |
static String |
SOFT_MAXIMUM |
static String |
USER_TIMEOUT |
static String |
VALIDATION_QUERY |
connstring, driver, password, properties, timeout, username
Constructor and Description |
---|
DBCPConnectionFactory(Map<String,String> properties,
boolean readOnly) |
Modifier and Type | Method and Description |
---|---|
void |
close()
INTERNAL: Closes the connection factory.
|
protected void |
initPool() |
Connection |
requestConnection()
INTERNAL: Requests a new connection object.
|
void |
writeReport(Writer out) |
getConnectionString, getDriver, getPassword, getUserName, loadSpyDriver
public static final String EXHAUSED_BLOCK
public static final String EXHAUSED_GROW
public static final String EXHAUSED_FAIL
public static final String ROOT
public static final String MIN_IDLE
public static final int DEFAULT_MIN_IDLE
public static final String MAX_ACTIVE
public static final int DEFAULT_MAX_ACTIVE
public static final String MAX_IDLE
public static final int DEFAULT_MAX_IDLE
public static final String USER_TIMEOUT
public static final int DEFAULT_USER_TIMEOUT
public static final String IDLE_TIMEOUT
public static final int DEFAULT_IDLE_TIMEOUT
public static final String SOFT_MAXIMUM
public static final boolean DEFAULT_SOFT_MAXIMUM
public static final String EXHAUSTED_ACTION
public static final String POOL_STATEMENTS
public static final String VALIDATION_QUERY
protected org.apache.commons.dbcp.AbandonedObjectPool pool
protected DataSource datasource
protected net.ontopia.persistence.proxy.DBCPConnectionFactory.TraceablePoolableConnectionFactory pcfactory
protected boolean readOnly
protected int defaultTransactionIsolation
protected void initPool()
public Connection requestConnection() throws SQLException
ConnectionFactoryIF
requestConnection
in interface ConnectionFactoryIF
requestConnection
in class AbstractConnectionFactory
SQLException
public void close()
ConnectionFactoryIF
close
in interface ConnectionFactoryIF
close
in class AbstractConnectionFactory
public void writeReport(Writer out) throws IOException
IOException