|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
org.apache.ojb.broker.util.pooling.PoolConfiguration
org.apache.ojb.broker.metadata.ConnectionPoolDescriptor
public class ConnectionPoolDescriptor
Encapsulates connection pooling and JDBC-driver configuration properties managed by
JdbcConnectionDescriptor
.
Every new instantiated ConnectionPoolDescriptor
is associated with
default connection pool attributes.
Field Summary | |
---|---|
static java.lang.String |
DBCP_PROPERTY_NAME_PREFIX
String prefix for DBCP properties. |
static java.lang.String |
FETCH_SIZE
Configuration attribute name for JDBC fetchSize hint. |
static java.lang.String |
JDBC_PROPERTY_NAME_PREFIX
String prefix for JDBC properties passed to DriverManager. |
Fields inherited from class org.apache.ojb.broker.util.pooling.PoolConfiguration |
---|
DEFAULT_LOG_ABANDONED, DEFAULT_MAX_ACTIVE, DEFAULT_MAX_IDLE, DEFAULT_MAX_WAIT, DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_MIN_IDLE, DEFAULT_NUM_TESTS_PER_EVICTION_RUN, DEFAULT_REMOVE_ABANDONED, DEFAULT_REMOVE_ABANDONED_TIMEOUT, DEFAULT_TEST_ON_BORROW, DEFAULT_TEST_ON_RETURN, DEFAULT_TEST_WHILE_IDLE, DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS, DEFAULT_WHEN_EXHAUSTED_ACTION, LOG_ABANDONED, MAX_ACTIVE, MAX_IDLE, MAX_WAIT, MIN_EVICTABLE_IDLE_TIME_MILLIS, MIN_IDLE, NUM_TESTS_PER_EVICTION_RUN, REMOVE_ABANDONED, REMOVE_ABANDONED_TIMEOUT, TEST_ON_BORROW, TEST_ON_RETURN, TEST_WHILE_IDLE, TIME_BETWEEN_EVICTION_RUNS_MILLIS, VALIDATION_QUERY, WHEN_EXHAUSTED_ACTION |
Constructor Summary | |
---|---|
ConnectionPoolDescriptor()
|
Method Summary | |
---|---|
void |
addAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Sets a custom configuration attribute. |
java.lang.Class |
getConnectionFactory()
|
java.util.Properties |
getDbcpProperties()
Returns the DBCP properties to be used for Statement caching when creating DBCP connection pool in OJB ConnectionFactory. |
int |
getFetchSize()
Returns the fetchSize hint set for this connection pool. |
java.util.Properties |
getJdbcProperties()
Returns the JDBC properties to be used by the ConnectionFactory when creating connections from DriverManager. |
void |
setConnectionFactory(java.lang.Class connectionFactory)
|
void |
setFetchSize(int fetchSize)
Sets the fetchSize hint for this connection pool. |
java.lang.String |
toXML()
returns the XML marshalled version of this instance. |
Methods inherited from class org.apache.ojb.broker.util.pooling.PoolConfiguration |
---|
getAbandonedConfig, getAttribute, getAttribute, getKeyedObjectPoolConfig, getMaxActive, getMaxIdle, getMaxWait, getMinEvictableIdleTimeMillis, getMinIdle, getNumTestsPerEvictionRun, getObjectPoolConfig, getRemoveAbandonedTimeout, getTimeBetweenEvictionRunsMillis, getValidationQuery, getWhenExhaustedAction, isLogAbandoned, isRemoveAbandoned, isTestOnBorrow, isTestOnReturn, isTestWhileIdle, setLogAbandoned, setMaxActive, setMaxIdle, setMaxWait, setMinEvictableIdleTimeMillis, setMinIdle, setNumTestsPerEvictionRun, setRemoveAbandoned, setRemoveAbandonedTimeout, setTestOnBorrow, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis, setValidationQuery, setWhenExhaustedAction |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String JDBC_PROPERTY_NAME_PREFIX
public static final java.lang.String DBCP_PROPERTY_NAME_PREFIX
public static final java.lang.String FETCH_SIZE
Constructor Detail |
---|
public ConnectionPoolDescriptor()
Method Detail |
---|
public java.lang.Class getConnectionFactory()
public void setConnectionFactory(java.lang.Class connectionFactory)
public int getFetchSize()
public void setFetchSize(int fetchSize)
fetchSize
- fetchSize hint or 0 to use JDBC-driver specific defaultpublic java.util.Properties getJdbcProperties()
public java.util.Properties getDbcpProperties()
public void addAttribute(java.lang.String attributeName, java.lang.String attributeValue)
addAttribute
in interface AttributeContainer
addAttribute
in class org.apache.ojb.broker.util.pooling.PoolConfiguration
attributeName
- the attribute name. Names starting with
JDBC_PROPERTY_NAME_PREFIX
will be used (without the prefix) by the
ConnectionFactory when creating connections from DriverManager
(not used for external DataSource connections). Names starting with
DBCP_PROPERTY_NAME_PREFIX
to Commons DBCP (if used, also without prefix).attributeValue
- the attribute valuepublic java.lang.String toXML()
XmlCapable
toXML
in interface XmlCapable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |