Top Fields Constructors Methods
com.mchange.v2.c3p0.impl

public abstract Class AbstractPoolBackedDataSource

extends PoolBackedDataSourceBase
implements PooledDataSource
Class Inheritance
All Implemented Interfaces
com.mchange.v2.c3p0.PooledDataSource, java.lang.AutoCloseable, javax.sql.DataSource, java.sql.Wrapper, javax.sql.CommonDataSource
Known Direct Subclasses
com.mchange.v2.c3p0.AbstractComboPooledDataSource, com.mchange.v2.c3p0.PoolBackedDataSource
Imports
java.io.*, java.sql.*, javax.sql.*, com.mchange.lang.ThrowableUtils, com.mchange.v2.c3p0.*, com.mchange.v2.log.*, java.beans.PropertyChangeEvent, .PropertyVetoException, .VetoableChangeListener, .PropertyChangeListener, java.util.Collection, .Collections, .Iterator, .LinkedList, .Map, .Set, com.mchange.v2.c3p0.cfg.C3P0Config

Field Summary

Modifier and TypeField and Description
pack-priv transient boolean
pack-priv static final MLogger
pack-priv static final String
pack-priv transient C3P0PooledConnectionPoolManager
private static final long
private static final short
Inherited from com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase:
pcsreferenceMakervcs

Constructor Summary

AccessConstructor and Description
protected
AbstractPoolBackedDataSource(boolean autoregister)

Method Summary

Modifier and TypeMethod and Description
private C3P0PooledConnectionPool
assertAuthPool(String username, String password)

private synchronized ConnectionPoolDataSource
public void
close()

Implements com.mchange.v2.c3p0.PooledDataSource.close.

C3P0 pooled DataSources use no resources before they are actually used in a VM, and they close themselves in their finalize() method.

public void
close(boolean force_destroy)

Implements com.mchange.v2.c3p0.PooledDataSource.close.

Deprecated the force_destroy argument is now meaningless, as pools are no longer potentially shared between multiple DataSources.

Should be used only with great caution.

public Collection<E>
public Connection
getConnection()

Implements javax.sql.DataSource.getConnection.

Attempts to establish a connection with the data source that this DataSource object represents.

public Connection
getConnection(String
the database user on whose behalf the connection is being made
username
,
String
the user's password
password
)

Implements javax.sql.DataSource.getConnection.

Attempts to establish a connection with the data source that this DataSource object represents.

public String
public float
public float
public Throwable
public Throwable
public Throwable
public Throwable
public Throwable
public Throwable
public Throwable
public Throwable
public Throwable
public Throwable
public int
getLoginTimeout()

Implements javax.sql.DataSource.getLoginTimeout.

Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.

public PrintWriter
getLogWriter()

Implements javax.sql.DataSource.getLogWriter.

Retrieves the log writer for this DataSource object.

public int
public int
public int
public int
public int
public int
public int
public int
public long
getNumFailedCheckins(String username, String password)

public long
public long
getNumFailedCheckouts(String username, String password)

public long
public long
getNumFailedIdleTests(String username, String password)

public long
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
private synchronized C3P0PooledConnectionPoolManager
public long
getStartTimeMillis(String username, String password)

public long
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public int
public long
getUpTimeMillis(String username, String password)

public long
public synchronized void
hardReset()

Implements com.mchange.v2.c3p0.PooledDataSource.hardReset.

Destroys all pooled and checked-out Connections associated with this DataSource immediately.

protected void
initializeNamedConfig(String configName, boolean shouldBindUserOverridesAsString)

public boolean
isWrapperFor(Class<?>
a Class defining an interface.
iface
)

Implements java.sql.Wrapper.isWrapperFor.

Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.

protected final boolean
private void
public synchronized void
public synchronized void
resetPoolManager(boolean close_checked_out_connections)

public String
public String
public String
public String
public String
public String
public String
public String
public String
public String
public String
public String
public String
public String
public String
public String
public void
setLoginTimeout(int
the data source login time limit
seconds
)

Implements javax.sql.DataSource.setLoginTimeout.

Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.

public void
setLogWriter(PrintWriter
the new log writer; to disable logging, set to null
out
)

Implements javax.sql.DataSource.setLogWriter.

Sets the log writer for this DataSource object to the given java.io.PrintWriter object.

private void
public void
softReset(String username, String password)

Implements com.mchange.v2.c3p0.PooledDataSource.softReset.

Discards all Connections managed by the PooledDataSource with the specified authentication credentials and reacquires new Connections to populate.

public void
softResetAllUsers()

Implements com.mchange.v2.c3p0.PooledDataSource.softResetAllUsers.

Discards all Connections managed by the PooledDataSource and reacquires new Connections to populate.

public void
softResetDefaultUser()

Implements com.mchange.v2.c3p0.PooledDataSource.softResetDefaultUser.

Discards all Connections managed by the PooledDataSource's default-authentication pool and reacquires new Connections to populate.

public abstract String
toString(boolean show_config)

public <T> T
unwrap(Class<T>
A Class defining an interface that the result must implement.
iface
)

Implements java.sql.Wrapper.unwrap.

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

private void
Inherited from com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase:
addPropertyChangeListeneraddPropertyChangeListeneraddVetoableChangeListenerextraToStringInfogetConnectionPoolDataSourcegetExtensionsgetFactoryClassLocationgetIdentityTokengetNumHelperThreadsgetParentLoggergetPropertyChangeListenersgetPropertyChangeSupportgetReferencegetVetoableChangeListenersgetVetoableChangeSupportremovePropertyChangeListenerremovePropertyChangeListenerremoveVetoableChangeListenersetConnectionPoolDataSourcesetDataSourceNamesetExtensionssetFactoryClassLocationsetIdentityTokensetNumHelperThreadstoString