Stay organized with collections
Save and categorize content based on your preferences.
ConnectionPoolDataSource
interface ConnectionPoolDataSource : CommonDataSource
A factory for PooledConnection
objects. An object that implements this interface will typically be registered with a naming service that is based on the JavaTM Naming and Directory Interface (JNDI).
Summary
Public methods |
abstract PooledConnection! |
Attempts to establish a physical database connection that can be used as a pooled connection.
|
abstract PooledConnection! |
Attempts to establish a physical database connection that can be used as a pooled connection.
|
Inherited functions |
From class CommonDataSource
PrintWriter! |
getLogWriter()
Retrieves the log writer for this DataSource object.
The log writer is a character output stream to which all logging and tracing messages for this data source will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.DriverManager class. When a DataSource object is created, the log writer is initially null; in other words, the default is for logging to be disabled.
|
Int |
getLoginTimeout()
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. A value of zero means that the timeout is the default system timeout if there is one; otherwise, it means that there is no timeout. When a DataSource object is created, the login timeout is initially zero.
|
Logger! |
getParentLogger()
Return the parent Logger of all the Loggers used by this data source. This should be the Logger farthest from the root Logger that is still an ancestor of all of the Loggers used by this data source. Configuring this Logger will affect all of the log messages generated by the data source. In the worst case, this may be the root Logger.
|
Unit |
setLogWriter(out: PrintWriter!)
Sets the log writer for this DataSource object to the given java.io.PrintWriter object.
The log writer is a character output stream to which all logging and tracing messages for this data source will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source- specific log writer are not printed to the log writer associated with the java.sql.DriverManager class. When a DataSource object is created the log writer is initially null; in other words, the default is for logging to be disabled.
|
Unit |
setLoginTimeout(seconds: Int)
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout. When a DataSource object is created, the login timeout is initially zero.
|
|
Public methods
getPooledConnection
abstract fun getPooledConnection(): PooledConnection!
Attempts to establish a physical database connection that can be used as a pooled connection.
Return |
PooledConnection! |
a PooledConnection object that is a physical connection to the database that this ConnectionPoolDataSource object represents |
Exceptions |
java.sql.SQLException |
if a database access error occurs |
SQLFeatureNotSupportedException |
if the JDBC driver does not support this method |
getPooledConnection
abstract fun getPooledConnection(
user: String!,
password: String!
): PooledConnection!
Attempts to establish a physical database connection that can be used as a pooled connection.
Parameters |
user |
String!: the database user on whose behalf the connection is being made |
password |
String!: the user's password |
Return |
PooledConnection! |
a PooledConnection object that is a physical connection to the database that this ConnectionPoolDataSource object represents |
Exceptions |
java.sql.SQLException |
if a database access error occurs |
SQLFeatureNotSupportedException |
if the JDBC driver does not support this method |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2020-08-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-08-04 UTC."],[],[]]