Top Description Fields Constructors Methods
com.mysql.cj.jdbc

public Class MysqlConnectionPoolDataSource

extends MysqlDataSource
implements ConnectionPoolDataSource
Class Inheritance
All Implemented Interfaces
javax.sql.ConnectionPoolDataSource, javax.sql.CommonDataSource
Imports
java.sql.Connection, .SQLException, java.util.concurrent.locks.Lock, .ReentrantLock, javax.sql.ConnectionPoolDataSource, .PooledConnection

This class is used to obtain a physical connection and instantiate and return a MysqlPooledConnection. J2EE application servers map client calls to dataSource.getConnection to this class based upon mapping set within deployment descriptor. This class extends MysqlDataSource.

Field Summary

Modifier and TypeField and Description
private final Lock
pack-priv static final long
Inherited from com.mysql.cj.jdbc.MysqlDataSource:
databaseNamedescriptionencodingexplicitPortexplicitUrlhostNamelogWritermysqlDriverpasswordportprofileSQLStringurluser

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PooledConnection
getPooledConnection()

Implements javax.sql.ConnectionPoolDataSource.getPooledConnection.

Attempts to establish a physical database connection that can be used as a pooled connection.

public PooledConnection
getPooledConnection(String
the database user on whose behalf the connection is being made
u
,
String
the user's password
p
)

Implements javax.sql.ConnectionPoolDataSource.getPooledConnection.

Attempts to establish a physical database connection that can be used as a pooled connection.

Inherited from com.mysql.cj.jdbc.MysqlDataSource:
exposeAsPropertiesgetBooleanRuntimePropertygetConnectiongetConnectiongetConnectiongetDatabaseNamegetDescriptiongetEnumRuntimePropertygetIntegerRuntimePropertygetLoginTimeoutgetLogWritergetLongRuntimePropertygetMemorySizeRuntimePropertygetParentLoggergetPasswordgetPortgetPortNumbergetReferencegetServerNamegetStringRuntimePropertygetURLgetUrlgetUserisWrapperForsetBooleanRuntimePropertysetDatabaseNamesetDescriptionsetEnumRuntimePropertysetIntegerRuntimePropertysetLoginTimeoutsetLogWritersetLongRuntimePropertysetMemorySizeRuntimePropertysetPasswordsetPortsetPortNumbersetPropertiesViaRefsetServerNamesetStringRuntimePropertysetURLsetUrlsetUserunwrap

Field Detail

lockback to summary
private final Lock lock
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.mysql.cj.jdbc.MysqlDataSource.serialVersionUID.

Constructor Detail

MysqlConnectionPoolDataSourceback to summary
public MysqlConnectionPoolDataSource()

Method Detail

getPooledConnectionback to summary
public PooledConnection getPooledConnection() throws SQLException

Implements javax.sql.ConnectionPoolDataSource.getPooledConnection.

Doc from javax.sql.ConnectionPoolDataSource.getPooledConnection.

Attempts to establish a physical database connection that can be used as a pooled connection.

Returns:PooledConnection

a PooledConnection object that is a physical connection to the database that this ConnectionPoolDataSource object represents

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs
getPooledConnectionback to summary
public PooledConnection getPooledConnection(String u, String p) throws SQLException

Implements javax.sql.ConnectionPoolDataSource.getPooledConnection.

Doc from javax.sql.ConnectionPoolDataSource.getPooledConnection.

Attempts to establish a physical database connection that can be used as a pooled connection.

Parameters
u:String

the database user on whose behalf the connection is being made

p:String

the user's password

Returns:PooledConnection

a PooledConnection object that is a physical connection to the database that this ConnectionPoolDataSource object represents

Annotations
@Override
Exceptions
SQLException:
if a database access error occurs