public abstract class AbstractPoolBackedDataSource extends PoolBackedDataSourceBase implements PooledDataSource
pcs, vcs| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPoolBackedDataSource(boolean autoregister) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
C3P0 pooled DataSources use no resources before they are actually used in a VM,
and they close themselves in their finalize() method.
|
void |
close(boolean force_destroy)
Deprecated.
the force_destroy argument is now meaningless, as pools are no longer
potentially shared between multiple DataSources.
|
java.util.Collection |
getAllUsers() |
java.sql.Connection |
getConnection() |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password) |
java.lang.String |
getDataSourceName() |
float |
getEffectivePropertyCycle(java.lang.String username,
java.lang.String password) |
float |
getEffectivePropertyCycleDefaultUser() |
java.lang.Throwable |
getLastAcquisitionFailure(java.lang.String username,
java.lang.String password) |
java.lang.Throwable |
getLastAcquisitionFailureDefaultUser() |
java.lang.Throwable |
getLastCheckinFailure(java.lang.String username,
java.lang.String password) |
java.lang.Throwable |
getLastCheckinFailureDefaultUser() |
java.lang.Throwable |
getLastCheckoutFailure(java.lang.String username,
java.lang.String password) |
java.lang.Throwable |
getLastCheckoutFailureDefaultUser() |
java.lang.Throwable |
getLastConnectionTestFailure(java.lang.String username,
java.lang.String password) |
java.lang.Throwable |
getLastConnectionTestFailureDefaultUser() |
java.lang.Throwable |
getLastIdleTestFailure(java.lang.String username,
java.lang.String password) |
java.lang.Throwable |
getLastIdleTestFailureDefaultUser() |
int |
getLoginTimeout() |
java.io.PrintWriter |
getLogWriter() |
int |
getNumBusyConnections() |
int |
getNumBusyConnections(java.lang.String username,
java.lang.String password) |
int |
getNumBusyConnectionsAllUsers() |
int |
getNumBusyConnectionsDefaultUser() |
int |
getNumConnections() |
int |
getNumConnections(java.lang.String username,
java.lang.String password) |
int |
getNumConnectionsAllUsers() |
int |
getNumConnectionsDefaultUser() |
long |
getNumFailedCheckins(java.lang.String username,
java.lang.String password) |
long |
getNumFailedCheckinsDefaultUser() |
long |
getNumFailedCheckouts(java.lang.String username,
java.lang.String password) |
long |
getNumFailedCheckoutsDefaultUser() |
long |
getNumFailedIdleTests(java.lang.String username,
java.lang.String password) |
long |
getNumFailedIdleTestsDefaultUser() |
int |
getNumIdleConnections() |
int |
getNumIdleConnections(java.lang.String username,
java.lang.String password) |
int |
getNumIdleConnectionsAllUsers() |
int |
getNumIdleConnectionsDefaultUser() |
int |
getNumThreadsAwaitingCheckout(java.lang.String username,
java.lang.String password) |
int |
getNumThreadsAwaitingCheckoutDefaultUser() |
int |
getNumUnclosedOrphanedConnections() |
int |
getNumUnclosedOrphanedConnections(java.lang.String username,
java.lang.String password) |
int |
getNumUnclosedOrphanedConnectionsAllUsers() |
int |
getNumUnclosedOrphanedConnectionsDefaultUser() |
int |
getNumUserPools() |
long |
getStartTimeMillis(java.lang.String username,
java.lang.String password) |
long |
getStartTimeMillisDefaultUser() |
int |
getStatementCacheNumCheckedOut(java.lang.String username,
java.lang.String password) |
int |
getStatementCacheNumCheckedOutDefaultUser() |
int |
getStatementCacheNumCheckedOutStatementsAllUsers() |
int |
getStatementCacheNumConnectionsWithCachedStatements(java.lang.String username,
java.lang.String password) |
int |
getStatementCacheNumConnectionsWithCachedStatementsAllUsers() |
int |
getStatementCacheNumConnectionsWithCachedStatementsDefaultUser() |
int |
getStatementCacheNumStatements(java.lang.String username,
java.lang.String password) |
int |
getStatementCacheNumStatementsAllUsers() |
int |
getStatementCacheNumStatementsDefaultUser() |
int |
getStatementDestroyerNumActiveThreads() |
int |
getStatementDestroyerNumConnectionsInUse(java.lang.String username,
java.lang.String password) |
int |
getStatementDestroyerNumConnectionsInUseAllUsers() |
int |
getStatementDestroyerNumConnectionsInUseDefaultUser() |
int |
getStatementDestroyerNumConnectionsWithDeferredDestroyStatements(java.lang.String username,
java.lang.String password) |
int |
getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsAllUsers() |
int |
getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsDefaultUser() |
int |
getStatementDestroyerNumDeferredDestroyStatements(java.lang.String username,
java.lang.String password) |
int |
getStatementDestroyerNumDeferredDestroyStatementsAllUsers() |
int |
getStatementDestroyerNumDeferredDestroyStatementsDefaultUser() |
int |
getStatementDestroyerNumIdleThreads() |
int |
getStatementDestroyerNumTasksPending() |
int |
getStatementDestroyerNumThreads() |
int |
getThreadPoolNumActiveThreads() |
int |
getThreadPoolNumIdleThreads() |
int |
getThreadPoolNumTasksPending() |
int |
getThreadPoolSize() |
long |
getUpTimeMillis(java.lang.String username,
java.lang.String password) |
long |
getUpTimeMillisDefaultUser() |
void |
hardReset()
Destroys all pooled and checked-out Connections associated with
this DataSource immediately.
|
protected void |
initializeNamedConfig(java.lang.String configName,
boolean shouldBindUserOverridesAsString) |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
protected boolean |
isWrapperForThis(java.lang.Class<?> iface) |
void |
resetPoolManager() |
void |
resetPoolManager(boolean close_checked_out_connections) |
java.lang.String |
sampleLastAcquisitionFailureStackTrace(java.lang.String username,
java.lang.String password) |
java.lang.String |
sampleLastAcquisitionFailureStackTraceDefaultUser() |
java.lang.String |
sampleLastCheckinFailureStackTrace(java.lang.String username,
java.lang.String password) |
java.lang.String |
sampleLastCheckinFailureStackTraceDefaultUser() |
java.lang.String |
sampleLastCheckoutFailureStackTrace(java.lang.String username,
java.lang.String password) |
java.lang.String |
sampleLastCheckoutFailureStackTraceDefaultUser() |
java.lang.String |
sampleLastConnectionTestFailureStackTrace(java.lang.String username,
java.lang.String password) |
java.lang.String |
sampleLastConnectionTestFailureStackTraceDefaultUser() |
java.lang.String |
sampleLastIdleTestFailureStackTrace(java.lang.String username,
java.lang.String password) |
java.lang.String |
sampleLastIdleTestFailureStackTraceDefaultUser() |
java.lang.String |
sampleStatementCacheStatus(java.lang.String username,
java.lang.String password) |
java.lang.String |
sampleStatementCacheStatusDefaultUser() |
java.lang.String |
sampleStatementDestroyerStackTraces() |
java.lang.String |
sampleStatementDestroyerStatus() |
java.lang.String |
sampleThreadPoolStackTraces() |
java.lang.String |
sampleThreadPoolStatus() |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(java.io.PrintWriter out) |
void |
softReset(java.lang.String username,
java.lang.String password)
Discards all Connections managed by the PooledDataSource with the specified authentication credentials
and reacquires new Connections to populate.
|
void |
softResetAllUsers()
Discards all Connections managed by the PooledDataSource
and reacquires new Connections to populate.
|
void |
softResetDefaultUser()
Discards all Connections managed by the PooledDataSource's default-authentication pool
and reacquires new Connections to populate.
|
abstract java.lang.String |
toString(boolean show_config) |
<T> T |
unwrap(java.lang.Class<T> iface) |
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, extraToStringInfo, getConnectionPoolDataSource, getExtensions, getFactoryClassLocation, getIdentityToken, getNumHelperThreads, getParentLogger, getPropertyChangeListeners, getPropertyChangeSupport, getReference, getVetoableChangeListeners, getVetoableChangeSupport, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setConnectionPoolDataSource, setDataSourceName, setExtensions, setFactoryClassLocation, setIdentityToken, setNumHelperThreads, toStringdoResolve, readResolve, verifyResolveequals, hashCodeclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetExtensions, getIdentityToken, getNumHelperThreads, setDataSourceName, setExtensionsprotected AbstractPoolBackedDataSource(boolean autoregister)
protected void initializeNamedConfig(java.lang.String configName,
boolean shouldBindUserOverridesAsString)
public java.lang.String getDataSourceName()
getDataSourceName in interface PooledDataSourcegetDataSourceName in class PoolBackedDataSourceBasepublic java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
getLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic void setLogWriter(java.io.PrintWriter out)
throws java.sql.SQLException
setLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic int getLoginTimeout()
throws java.sql.SQLException
getLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic void setLoginTimeout(int seconds)
throws java.sql.SQLException
setLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic int getNumConnections()
throws java.sql.SQLException
getNumConnections in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumIdleConnections()
throws java.sql.SQLException
getNumIdleConnections in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumBusyConnections()
throws java.sql.SQLException
getNumBusyConnections in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumUnclosedOrphanedConnections()
throws java.sql.SQLException
getNumUnclosedOrphanedConnections in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumConnectionsDefaultUser()
throws java.sql.SQLException
getNumConnectionsDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumIdleConnectionsDefaultUser()
throws java.sql.SQLException
getNumIdleConnectionsDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumBusyConnectionsDefaultUser()
throws java.sql.SQLException
getNumBusyConnectionsDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumUnclosedOrphanedConnectionsDefaultUser()
throws java.sql.SQLException
getNumUnclosedOrphanedConnectionsDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementCacheNumStatementsDefaultUser()
throws java.sql.SQLException
getStatementCacheNumStatementsDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementCacheNumCheckedOutDefaultUser()
throws java.sql.SQLException
getStatementCacheNumCheckedOutDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementCacheNumConnectionsWithCachedStatementsDefaultUser()
throws java.sql.SQLException
getStatementCacheNumConnectionsWithCachedStatementsDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic float getEffectivePropertyCycleDefaultUser()
throws java.sql.SQLException
getEffectivePropertyCycleDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic long getStartTimeMillisDefaultUser()
throws java.sql.SQLException
getStartTimeMillisDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic long getUpTimeMillisDefaultUser()
throws java.sql.SQLException
getUpTimeMillisDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic long getNumFailedCheckinsDefaultUser()
throws java.sql.SQLException
getNumFailedCheckinsDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic long getNumFailedCheckoutsDefaultUser()
throws java.sql.SQLException
getNumFailedCheckoutsDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic long getNumFailedIdleTestsDefaultUser()
throws java.sql.SQLException
getNumFailedIdleTestsDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumThreadsAwaitingCheckoutDefaultUser()
throws java.sql.SQLException
getNumThreadsAwaitingCheckoutDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getThreadPoolSize()
throws java.sql.SQLException
getThreadPoolSize in interface PooledDataSourcejava.sql.SQLExceptionpublic int getThreadPoolNumActiveThreads()
throws java.sql.SQLException
getThreadPoolNumActiveThreads in interface PooledDataSourcejava.sql.SQLExceptionpublic int getThreadPoolNumIdleThreads()
throws java.sql.SQLException
getThreadPoolNumIdleThreads in interface PooledDataSourcejava.sql.SQLExceptionpublic int getThreadPoolNumTasksPending()
throws java.sql.SQLException
getThreadPoolNumTasksPending in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleThreadPoolStackTraces()
throws java.sql.SQLException
sampleThreadPoolStackTraces in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleThreadPoolStatus()
throws java.sql.SQLException
sampleThreadPoolStatus in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleStatementCacheStatusDefaultUser()
throws java.sql.SQLException
sampleStatementCacheStatusDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleStatementCacheStatus(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
sampleStatementCacheStatus in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.Throwable getLastAcquisitionFailureDefaultUser()
throws java.sql.SQLException
getLastAcquisitionFailureDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.Throwable getLastCheckinFailureDefaultUser()
throws java.sql.SQLException
getLastCheckinFailureDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.Throwable getLastCheckoutFailureDefaultUser()
throws java.sql.SQLException
getLastCheckoutFailureDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.Throwable getLastIdleTestFailureDefaultUser()
throws java.sql.SQLException
getLastIdleTestFailureDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.Throwable getLastConnectionTestFailureDefaultUser()
throws java.sql.SQLException
getLastConnectionTestFailureDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.Throwable getLastAcquisitionFailure(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getLastAcquisitionFailure in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.Throwable getLastCheckinFailure(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getLastCheckinFailure in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.Throwable getLastCheckoutFailure(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getLastCheckoutFailure in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.Throwable getLastIdleTestFailure(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getLastIdleTestFailure in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.Throwable getLastConnectionTestFailure(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getLastConnectionTestFailure in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumThreadsAwaitingCheckout(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getNumThreadsAwaitingCheckout in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleLastAcquisitionFailureStackTraceDefaultUser()
throws java.sql.SQLException
sampleLastAcquisitionFailureStackTraceDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleLastCheckinFailureStackTraceDefaultUser()
throws java.sql.SQLException
sampleLastCheckinFailureStackTraceDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleLastCheckoutFailureStackTraceDefaultUser()
throws java.sql.SQLException
sampleLastCheckoutFailureStackTraceDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleLastIdleTestFailureStackTraceDefaultUser()
throws java.sql.SQLException
sampleLastIdleTestFailureStackTraceDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleLastConnectionTestFailureStackTraceDefaultUser()
throws java.sql.SQLException
sampleLastConnectionTestFailureStackTraceDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleLastAcquisitionFailureStackTrace(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
sampleLastAcquisitionFailureStackTrace in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleLastCheckinFailureStackTrace(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
sampleLastCheckinFailureStackTrace in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleLastCheckoutFailureStackTrace(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
sampleLastCheckoutFailureStackTrace in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleLastIdleTestFailureStackTrace(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
sampleLastIdleTestFailureStackTrace in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleLastConnectionTestFailureStackTrace(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
sampleLastConnectionTestFailureStackTrace in interface PooledDataSourcejava.sql.SQLExceptionpublic void softResetDefaultUser()
throws java.sql.SQLException
PooledDataSourcesoftResetDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumConnections(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getNumConnections in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumIdleConnections(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getNumIdleConnections in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumBusyConnections(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getNumBusyConnections in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumUnclosedOrphanedConnections(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getNumUnclosedOrphanedConnections in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementCacheNumStatements(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getStatementCacheNumStatements in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementCacheNumCheckedOut(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getStatementCacheNumCheckedOut in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementCacheNumConnectionsWithCachedStatements(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getStatementCacheNumConnectionsWithCachedStatements in interface PooledDataSourcejava.sql.SQLExceptionpublic float getEffectivePropertyCycle(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getEffectivePropertyCycle in interface PooledDataSourcejava.sql.SQLExceptionpublic long getStartTimeMillis(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
java.sql.SQLExceptionpublic long getUpTimeMillis(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
java.sql.SQLExceptionpublic long getNumFailedCheckins(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
java.sql.SQLExceptionpublic long getNumFailedCheckouts(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
java.sql.SQLExceptionpublic long getNumFailedIdleTests(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void softReset(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
PooledDataSourcesoftReset in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumBusyConnectionsAllUsers()
throws java.sql.SQLException
getNumBusyConnectionsAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumIdleConnectionsAllUsers()
throws java.sql.SQLException
getNumIdleConnectionsAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumConnectionsAllUsers()
throws java.sql.SQLException
getNumConnectionsAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumUnclosedOrphanedConnectionsAllUsers()
throws java.sql.SQLException
getNumUnclosedOrphanedConnectionsAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementCacheNumStatementsAllUsers()
throws java.sql.SQLException
getStatementCacheNumStatementsAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementCacheNumCheckedOutStatementsAllUsers()
throws java.sql.SQLException
getStatementCacheNumCheckedOutStatementsAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementCacheNumConnectionsWithCachedStatementsAllUsers()
throws java.sql.SQLException
getStatementCacheNumConnectionsWithCachedStatementsAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumConnectionsInUseAllUsers()
throws java.sql.SQLException
getStatementDestroyerNumConnectionsInUseAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsAllUsers()
throws java.sql.SQLException
getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumDeferredDestroyStatementsAllUsers()
throws java.sql.SQLException
getStatementDestroyerNumDeferredDestroyStatementsAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumConnectionsInUseDefaultUser()
throws java.sql.SQLException
getStatementDestroyerNumConnectionsInUseDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsDefaultUser()
throws java.sql.SQLException
getStatementDestroyerNumConnectionsWithDeferredDestroyStatementsDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumDeferredDestroyStatementsDefaultUser()
throws java.sql.SQLException
getStatementDestroyerNumDeferredDestroyStatementsDefaultUser in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumThreads()
throws java.sql.SQLException
getStatementDestroyerNumThreads in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumActiveThreads()
throws java.sql.SQLException
getStatementDestroyerNumActiveThreads in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumIdleThreads()
throws java.sql.SQLException
getStatementDestroyerNumIdleThreads in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumTasksPending()
throws java.sql.SQLException
getStatementDestroyerNumTasksPending in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumConnectionsInUse(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getStatementDestroyerNumConnectionsInUse in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumConnectionsWithDeferredDestroyStatements(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getStatementDestroyerNumConnectionsWithDeferredDestroyStatements in interface PooledDataSourcejava.sql.SQLExceptionpublic int getStatementDestroyerNumDeferredDestroyStatements(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getStatementDestroyerNumDeferredDestroyStatements in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleStatementDestroyerStackTraces()
throws java.sql.SQLException
sampleStatementDestroyerStackTraces in interface PooledDataSourcejava.sql.SQLExceptionpublic java.lang.String sampleStatementDestroyerStatus()
throws java.sql.SQLException
sampleStatementDestroyerStatus in interface PooledDataSourcejava.sql.SQLExceptionpublic void softResetAllUsers()
throws java.sql.SQLException
PooledDataSourcesoftResetAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic int getNumUserPools()
throws java.sql.SQLException
getNumUserPools in interface PooledDataSourcejava.sql.SQLExceptionpublic java.util.Collection getAllUsers()
throws java.sql.SQLException
getAllUsers in interface PooledDataSourcejava.sql.SQLExceptionpublic void hardReset()
PooledDataSourcehardReset in interface PooledDataSourcepublic void close()
PooledDataSourceC3P0 pooled DataSources use no resources before they are actually used in a VM, and they close themselves in their finalize() method. When they are active and pooling, they may have open database connections and their pool may spawn several threads for its maintenance. You can use this method to clean these resource methods up quickly when you will no longer be using this DataSource. The resources will actually be cleaned up only if no other DataSources are sharing the same pool.
You can equivalently use the static method destroy() in the DataSources class to clean-up these resources.
This is equivalent to calling close( false ).
close in interface PooledDataSourceDataSources.destroy(javax.sql.DataSource)public void close(boolean force_destroy)
PooledDataSourceShould be used only with great caution. If force_destroy is set to true, this immediately destroys any pool and cleans up all resources this DataSource may be using, even if other DataSources are sharing that pool! In general, it is difficult to know whether a pool is being shared by multiple DataSources. It may depend upon whether or not a JNDI implementation returns a single instance or multiple copies upon lookup (which is undefined by the JNDI spec).
In general, this method should be used only when you wish to wind down all c3p0 pools in a ClassLoader. For example, when shutting down and restarting a web application that uses c3p0, you may wish to kill all threads making use of classes loaded by a web-app specific ClassLoader, so that the ClassLoader can be cleanly garbage collected. In this case, you may wish to use force destroy. Otherwise, it is much safer to use the simple destroy() method, which will not shut down pools that may still be in use.
To close a pool normally, use the no argument close method, or set force_destroy to false.
close in interface PooledDataSourcePooledDataSource.close()public void resetPoolManager()
public void resetPoolManager(boolean close_checked_out_connections)
public abstract java.lang.String toString(boolean show_config)
protected final boolean isWrapperForThis(java.lang.Class<?> iface)
public boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLExceptionpublic <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLException