|
||||||||||
| 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<Object,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 String |
DBCP_PROPERTY_NAME_PREFIX
String prefix for DBCP properties. |
protected Properties |
dbcpProperties
DBCP Statement cache properties configured in OJB (not used for DataSource connections). |
static String |
FETCH_SIZE
Configuration attribute name for JDBC fetchSize hint. |
static String |
JDBC_PROPERTY_NAME_PREFIX
String prefix for JDBC properties passed to DriverManager. |
protected Properties |
jdbcProperties
JDBC properties configured in OJB (not used for DataSource connections). |
| Fields inherited from class java.util.Properties |
|---|
defaults |
| Constructor Summary | |
|---|---|
ConnectionPoolDescriptor()
|
|
| Method Summary | |
|---|---|
void |
addAttribute(String attributeName,
String attributeValue)
Sets a custom configuration attribute. |
Class |
getConnectionFactory()
|
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. |
Properties |
getJdbcProperties()
Returns the JDBC properties to be used by the ConnectionFactory when creating connections from DriverManager. |
void |
setConnectionFactory(Class connectionFactory)
|
void |
setFetchSize(int fetchSize)
Sets the fetchSize hint for this connection pool. |
String |
toXML()
returns the XML marshalled version of this instance. |
| 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, rehash, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String JDBC_PROPERTY_NAME_PREFIX
public static final String DBCP_PROPERTY_NAME_PREFIX
protected Properties jdbcProperties
protected Properties dbcpProperties
public static final String FETCH_SIZE
| Constructor Detail |
|---|
public ConnectionPoolDescriptor()
| Method Detail |
|---|
public Class getConnectionFactory()
public void setConnectionFactory(Class connectionFactory)
public int getFetchSize()
public void setFetchSize(int fetchSize)
fetchSize - fetchSize hint or 0 to use JDBC-driver specific defaultpublic Properties getJdbcProperties()
public Properties getDbcpProperties()
public void addAttribute(String attributeName,
String attributeValue)
addAttribute in interface AttributeContaineraddAttribute in class PoolConfigurationattributeName - 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 String toXML()
XmlCapable
toXML in interface XmlCapable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||