Top Description Fields Constructors Methods
org.apache.derby.jdbc

public Class BasicEmbeddedConnectionPoolDataSource40

extends BasicEmbeddedDataSource40
implements ConnectionPoolDataSource, EmbeddedConnectionPoolDataSourceInterface
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.jdbc.EmbeddedConnectionPoolDataSourceInterface, javax.sql.ConnectionPoolDataSource, javax.sql.CommonDataSource, org.apache.derby.iapi.jdbc.EmbeddedDataSourceInterface, javax.sql.DataSource, java.sql.Wrapper
Imports
java.sql.SQLException, javax.sql.PooledConnection, org.apache.derby.iapi.jdbc.EmbeddedConnectionPoolDataSourceInterface, org.apache.derby.impl.jdbc.EmbedPooledConnection

This data source is suitable for an application using embedded Derby, running on Java 8 Compact Profile 2 or higher.

BasicEmbeddedConnectionPoolDataSource40 is similar to EmbeddedConnectionPoolDataSource40 except it does not support JNDI naming, i.e. it does not implement javax.naming.Referenceable.

See Also
EmbeddedConnectionPoolDataSource40

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from org.apache.derby.jdbc.BasicEmbeddedDataSource40:
attributesAsPasswordconnectionAttributescreateDatabasedatabaseNamedataSourceNamedescriptiondriverjdbcurlloginTimeoutshutdownDatabase

Constructor Summary

AccessConstructor and Description
public
BasicEmbeddedConnectionPoolDataSource40()

No-argument constructor.

Method Summary

Modifier and TypeMethod and Description
private PooledConnection

Returns:

a connection to the database
createPooledConnection
(String
the user name used to authenticate the connection
user
,
String
the user's password
password
,
boolean
false if original call is from a no-argument constructor, otherwise true
requestPassword
)

Minion helper method.

public final PooledConnection
getPooledConnection()

Implements javax.sql.ConnectionPoolDataSource.getPooledConnection.

Attempts to establish a physical database connection that can be used as a pooled connection.
public final PooledConnection
getPooledConnection(String
the database user on whose behalf the connection is being made
username
,
String
the user's password
password
)

Implements javax.sql.ConnectionPoolDataSource.getPooledConnection.

Attempts to establish a physical database connection that can be used as a pooled connection.
Inherited from org.apache.derby.jdbc.BasicEmbeddedDataSource40:
equalsfindDrivergetAttributesAsPasswordgetConnectiongetConnectiongetConnectiongetConnectionAttributesgetCreateDatabasegetDatabaseNamegetDataSourceNamegetDescriptiongetLoginTimeoutgetLogWritergetParentLoggergetPasswordgetShutdownDatabasegetUserhashCodeisWrapperForsetAttributesAsPasswordsetConnectionAttributessetCreateDatabasesetDatabaseNamesetDataSourceNamesetDescriptionsetLoginTimeoutsetLogWritersetPasswordsetShutdownDatabasesetupResourceAdaptersetUserunwrapupdate

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.apache.derby.jdbc.BasicEmbeddedDataSource40.serialVersionUID.

Constructor Detail

BasicEmbeddedConnectionPoolDataSource40back to summary
public BasicEmbeddedConnectionPoolDataSource40()

No-argument constructor.

Method Detail

createPooledConnectionback to summary
private PooledConnection createPooledConnection(String user, String password, boolean requestPassword) throws SQLException

Minion helper method. Create and return a pooled connection

Parameters
user:String

the user name used to authenticate the connection

password:String

the user's password

requestPassword:boolean

false if original call is from a no-argument constructor, otherwise true

Returns:PooledConnection

a connection to the database

Exceptions
SQLException:
if a database-access error occurs
getPooledConnectionback to summary
public final 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 final PooledConnection getPooledConnection(String username, String password) 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
username:String

the database user on whose behalf the connection is being made

password: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