public class DriverConfig
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.logging.Logger |
log |
static java.lang.String |
PROPERTY_PASSWORD
The key used to look into the properties passed to the
connect method to find the password.
|
static java.lang.String |
PROPERTY_USER
The key used to look into the properties passed to the
connect method to find the username.
|
Constructor and Description |
---|
DriverConfig(DBPoolImpl pool)
Null constructor for the Driver interface; called by the JNDI
configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
addBuilderProgram(ConfigProgram program)
Adds to the builder program.
|
ProfilerPointConfig |
createProfilerPoint()
Configure a ProfilerPointConfig, used to create a ProfilerPoint
that is then passed to setProfiler().
|
protected java.lang.String |
findDriverByUrl(java.lang.String url) |
JdbcDriverMXBean |
getAdmin()
Returns the driver admin.
|
long |
getConnectionCountTotal()
Returns the total number of connections made.
|
long |
getConnectionFailCountTotal()
Returns the total number of failing connections
|
DBPoolImpl |
getDBPool()
Returns the DBPool.
|
java.sql.Driver |
getDriver()
Returns the driver object.
|
java.lang.Class<?> |
getDriverClass()
Returns the JDBC driver class for the pooled object.
|
int |
getIndex() |
java.util.Properties |
getInfo()
Returns the properties.
|
long |
getLastFailTime()
Returns the time of the last connection
|
ManagedConnectionFactory |
getManagedConnectionFactory()
Returns the managed connection factory.
|
java.lang.String |
getPassword()
Returns the connection's password
|
javax.sql.ConnectionPoolDataSource |
getPoolDataSource()
Returns the driver pool.
|
java.lang.String |
getType() |
java.lang.String |
getURL()
Returns the connection's JDBC url.
|
java.lang.String |
getUser()
Returns the connection's user.
|
javax.sql.XADataSource |
getXADataSource()
Returns any XADataSource.
|
void |
init() |
void |
initDriver()
Initializes the JDBC driver.
|
boolean |
isLocalTransaction()
Returns true if the driver is XA enabled.
|
boolean |
isXATransaction()
Returns true if the driver is XA enabled.
|
void |
setDataSource(java.lang.Object dataSource)
Sets the driver as data source.
|
void |
setDriver(java.sql.Driver driver)
Sets the driver object.
|
void |
setDriverObject(java.lang.Object driverObject) |
void |
setDriverType(java.lang.String type)
Sets the driver as data source.
|
void |
setIndex(int index) |
void |
setInitParam(InitParam initParam)
Sets a property from the underlying driver.
|
void |
setInitParam(java.lang.String key,
java.lang.String value)
Sets a property from the underlying driver.
|
void |
setPassword(java.lang.String password)
Sets the connection's password
|
void |
setPoolDataSource(javax.sql.ConnectionPoolDataSource pDataSource)
Sets the pooled data source driver.
|
void |
setProfilerPoint(ProfilerPoint profilerPoint)
Enables profiling for this driver.
|
void |
setProperty(java.lang.String name,
java.lang.Object value) |
void |
setType(java.lang.Class<?> driverClass)
Sets the JDBC driver class underlying the pooled object.
|
void |
setURL(java.lang.String url)
Sets the connection's JDBC url.
|
void |
setUser(java.lang.String user)
Sets the connection's user.
|
void |
setXADataSource(javax.sql.XADataSource xaDataSource)
Sets the xa data source driver.
|
java.lang.String |
toString()
Returns a string description of the pool.
|
protected static final java.util.logging.Logger log
public static final java.lang.String PROPERTY_USER
public static final java.lang.String PROPERTY_PASSWORD
public DriverConfig(DBPoolImpl pool)
public DBPoolImpl getDBPool()
public void setDriverType(java.lang.String type) throws ConfigException
ConfigException
public void setDataSource(java.lang.Object dataSource) throws ConfigException
ConfigException
public java.lang.Class<?> getDriverClass()
public void setType(java.lang.Class<?> driverClass) throws ConfigException
ConfigException
public java.lang.String getType()
public java.lang.String getURL()
public void setURL(java.lang.String url)
public void addBuilderProgram(ConfigProgram program)
public void setProperty(java.lang.String name, java.lang.Object value)
public java.lang.String getUser()
public void setUser(java.lang.String user)
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public void setInitParam(InitParam initParam)
name
- property name for the drivervalue
- the driver's value of the property namepublic void setInitParam(java.lang.String key, java.lang.String value)
name
- property name for the drivervalue
- the driver's value of the property namepublic java.util.Properties getInfo()
public java.sql.Driver getDriver() throws java.sql.SQLException
java.sql.SQLException
public void setDriver(java.sql.Driver driver) throws java.sql.SQLException
java.sql.SQLException
public void setDriverObject(java.lang.Object driverObject)
public javax.sql.ConnectionPoolDataSource getPoolDataSource() throws java.sql.SQLException
java.sql.SQLException
public void setPoolDataSource(javax.sql.ConnectionPoolDataSource pDataSource) throws java.sql.SQLException
java.sql.SQLException
public javax.sql.XADataSource getXADataSource()
public void setXADataSource(javax.sql.XADataSource xaDataSource) throws java.sql.SQLException
java.sql.SQLException
public ManagedConnectionFactory getManagedConnectionFactory()
public boolean isXATransaction()
public boolean isLocalTransaction()
public ProfilerPointConfig createProfilerPoint()
public void setProfilerPoint(ProfilerPoint profilerPoint)
public void setIndex(int index)
public int getIndex()
public JdbcDriverMXBean getAdmin()
@PostConstruct public void init()
public void initDriver() throws java.sql.SQLException
java.sql.SQLException
protected java.lang.String findDriverByUrl(java.lang.String url)
public long getConnectionCountTotal()
public long getConnectionFailCountTotal()
public long getLastFailTime()
public java.lang.String toString()
toString
in class java.lang.Object