@Deprecated public abstract class AbstractDriverConnectionPoolDataSource extends BasicAbstractConnectionPool implements javax.sql.ConnectionPoolDataSource, PooledConnectionEventListener
ConnectionPoolDataSource
that
uses DriverManager
to open physical connections to the
database.AbstractConnectionPool.UserPasswordPair
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
DRIVER_CLASS_NAME
Deprecated.
|
static AbstractConnectionPool.UserPasswordPair |
EMPTY_USER_PASSWORD
Deprecated.
|
protected static java.lang.String |
JDBC_URL
Deprecated.
|
protected static java.lang.String |
PROPERTIES
Deprecated.
|
Constructor and Description |
---|
AbstractDriverConnectionPoolDataSource()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
connectionClosed(javax.sql.ConnectionEvent connectionEvent)
Deprecated.
Notify about connection being closed.
|
void |
connectionErrorOccurred(javax.sql.ConnectionEvent event)
Deprecated.
Notify about serious error when using the connection.
|
protected BasicAbstractConnectionPool |
createObjectInstance()
Deprecated.
Create instance of this data source.
|
protected PooledConnectionManager |
getConnectionManager()
Deprecated.
Get connection manager that will allocate physical connections to the
database.
|
javax.naming.Reference |
getDefaultReference()
Deprecated.
Get default JNDI reference for this instance.
|
java.lang.String |
getDriverClassName()
Deprecated.
|
int |
getFreeSize()
Deprecated.
Get number of free connections in this pool.
|
java.lang.String |
getIsolation()
Deprecated.
|
java.lang.String |
getJdbcUrl()
Deprecated.
|
protected org.firebirdsql.logging.Logger |
getLogger()
Deprecated.
Get logger for this instance.
|
int |
getLoginTimeout()
Deprecated.
Get login timeout.
|
java.io.PrintWriter |
getLogWriter()
Deprecated.
|
javax.sql.PooledConnection |
getPooledConnection()
Deprecated.
Get pooled connection.
|
protected PooledObject |
getPooledConnection(org.firebirdsql.pool.PooledConnectionQueue queue)
Deprecated.
Get pooled connection from the pooled queue.
|
javax.sql.PooledConnection |
getPooledConnection(java.lang.String user,
java.lang.String password)
Deprecated.
Get pooled connection for the specified user name and password.
|
protected java.lang.String |
getPoolName()
Deprecated.
Get name of this connection pool.
|
java.util.Properties |
getProperties()
Deprecated.
|
java.lang.String |
getProperty(java.lang.String name)
Deprecated.
|
int |
getTotalSize()
Deprecated.
Get total size of physical connections opened to the database.
|
int |
getTransactionIsolationLevel()
Deprecated.
|
int |
getWorkingSize()
Deprecated.
Get number of connections that are in use.
|
void |
physicalConnectionClosed(javax.sql.ConnectionEvent connectionEvent)
Deprecated.
Notify about physical connection being closed.
|
void |
physicalConnectionDeallocated(javax.sql.ConnectionEvent connectionEvent)
Deprecated.
Notify about the deallocation of the physical connection.
|
protected java.lang.Object |
processObjectInstance(AbstractDriverConnectionPoolDataSource ds,
java.lang.Object obj)
Deprecated.
|
void |
setDriverClassName(java.lang.String driverClassName)
Deprecated.
|
void |
setIsolation(java.lang.String isolation)
Deprecated.
|
void |
setJdbcUrl(java.lang.String jdbcUrl)
Deprecated.
|
void |
setLoginTimeout(int seconds)
Deprecated.
Set login timeout for new connection.
|
void |
setLogWriter(java.io.PrintWriter out)
Deprecated.
|
void |
setProperties(java.util.Properties properties)
Deprecated.
Set JDBC properties that will be passed when opening a connection.
|
void |
setProperty(java.lang.String name,
java.lang.String value)
Deprecated.
|
void |
setTransactionIsolationLevel(int transactionIsolation)
Deprecated.
|
deserialize, getBlockingTimeout, getConfiguration, getIdleTimeout, getMaxConnections, getMaxIdleTime, getMaxPoolSize, getMaxStatements, getMinConnections, getMinPoolSize, getObjectInstance, getPingInterval, getPingStatement, getRefAddr, getReference, getRetryInterval, isKeepStatements, isPingable, isPooling, isStatementPooling, serialize, setBlockingTimeout, setIdleTimeout, setKeepStatements, setMaxConnections, setMaxIdleTime, setMaxPoolSize, setMaxStatements, setMinConnections, setMinPoolSize, setPingInterval, setPingStatement, setPooling, setReference, setRetryInterval, setStatementPooling
finalize, getQueue, physicalConnectionDeallocated, pooledObjectReleased, restart, shutdown
getParentLogger
public static final AbstractConnectionPool.UserPasswordPair EMPTY_USER_PASSWORD
protected static final java.lang.String PROPERTIES
protected static final java.lang.String DRIVER_CLASS_NAME
protected static final java.lang.String JDBC_URL
public AbstractDriverConnectionPoolDataSource()
public java.lang.String getJdbcUrl()
public void setJdbcUrl(java.lang.String jdbcUrl)
public java.lang.String getDriverClassName()
public void setDriverClassName(java.lang.String driverClassName)
public java.lang.String getProperty(java.lang.String name)
public void setProperty(java.lang.String name, java.lang.String value)
public java.util.Properties getProperties()
public void setProperties(java.util.Properties properties)
properties
- instance of Properties
containing properties
of a connection to open.getProperties()
protected org.firebirdsql.logging.Logger getLogger()
AbstractConnectionPool
getLogger
in class AbstractConnectionPool
Logger
.public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.sql.CommonDataSource
getLogWriter
in class BasicAbstractConnectionPool
public void setLogWriter(java.io.PrintWriter out)
setLogWriter
in interface javax.sql.CommonDataSource
setLogWriter
in class BasicAbstractConnectionPool
public int getLoginTimeout()
getLoginTimeout
in interface javax.sql.CommonDataSource
getLoginTimeout
in class BasicAbstractConnectionPool
setLoginTimeout(int)
method or 0.public void setLoginTimeout(int seconds)
setLoginTimeout
in interface javax.sql.CommonDataSource
setLoginTimeout
in class BasicAbstractConnectionPool
seconds
- how long pool should wait until new connection is
granted.public int getTransactionIsolationLevel()
public void setTransactionIsolationLevel(int transactionIsolation)
public java.lang.String getIsolation()
public void setIsolation(java.lang.String isolation) throws java.sql.SQLException
java.sql.SQLException
protected PooledConnectionManager getConnectionManager() throws java.sql.SQLException
getConnectionManager
in class AbstractConnectionPool
PooledConnectionManager
class.java.sql.SQLException
- if connection manager cannot be obtained.protected java.lang.String getPoolName()
getPoolName
in class AbstractConnectionPool
protected PooledObject getPooledConnection(org.firebirdsql.pool.PooledConnectionQueue queue) throws java.sql.SQLException
getPooledConnection
in class AbstractConnectionPool
queue
- instance of PooledConnectionQueue
where connection
will be obtained.PooledObject
.java.sql.SQLException
- if pooled connection cannot be obtained.public javax.sql.PooledConnection getPooledConnection() throws java.sql.SQLException
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
getPooledConnection
in class BasicAbstractConnectionPool
PooledConnection
.java.sql.SQLException
- if pooled connection cannot be obtained.public javax.sql.PooledConnection getPooledConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
getPooledConnection
in class BasicAbstractConnectionPool
user
- user name.password
- password corresponding to specified user name.PooledConnection
for the specified
credentials.java.sql.SQLException
- always, this method is not yet implemented.public void connectionClosed(javax.sql.ConnectionEvent connectionEvent)
connectionClosed
in interface javax.sql.ConnectionEventListener
connectionEvent
- instance of ConnectionEvent
.public void physicalConnectionClosed(javax.sql.ConnectionEvent connectionEvent)
physicalConnectionClosed
in interface PooledConnectionEventListener
connectionEvent
- instance of ConnectionEvent
.public void physicalConnectionDeallocated(javax.sql.ConnectionEvent connectionEvent)
physicalConnectionDeallocated
in interface PooledConnectionEventListener
connectionEvent
- instance of ConnectionEvent
.public void connectionErrorOccurred(javax.sql.ConnectionEvent event)
connectionErrorOccurred
in interface javax.sql.ConnectionEventListener
event
- instance of ConnectionEvent
containing
information about an error.public int getFreeSize() throws java.sql.SQLException
AbstractConnectionPool
getMaxSize() != 0 && getMaxSize() == getWorkingSize()
,
meaning that we have allocated maximum number of connections and all
of them are in use.getFreeSize
in class AbstractConnectionPool
java.sql.SQLException
public int getTotalSize() throws java.sql.SQLException
AbstractConnectionPool
getTotalSize
in class AbstractConnectionPool
java.sql.SQLException
public int getWorkingSize() throws java.sql.SQLException
AbstractConnectionPool
getWorkingSize
in class AbstractConnectionPool
java.sql.SQLException
protected BasicAbstractConnectionPool createObjectInstance()
createObjectInstance
in class BasicAbstractConnectionPool
public javax.naming.Reference getDefaultReference()
getDefaultReference
in class BasicAbstractConnectionPool
Reference
containing all information
that allows to reconstruct the datasource.protected java.lang.Object processObjectInstance(AbstractDriverConnectionPoolDataSource ds, java.lang.Object obj) throws java.lang.Exception
java.lang.Exception
Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.