public interface ConnectionPoolDataSource extends CommonDataSource
PooledConnection对象。
实现此接口的对象通常将使用基于Java“命名和目录接口(JNDI)”的命名服务进行注册。
| Modifier and Type | Method and Description |
|---|---|
PooledConnection |
getPooledConnection()
尝试建立可用作池连接的物理数据库连接。
|
PooledConnection |
getPooledConnection(String user, String password)
尝试建立可用作池连接的物理数据库连接。
|
getLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriterPooledConnection getPooledConnection() throws SQLException
PooledConnection对象,它是与该
ConnectionPoolDataSource对象所代表的数据库的物理连接
SQLException - 如果发生数据库访问错误
SQLFeatureNotSupportedException - 如果JDBC驱动程序不支持此方法
PooledConnection getPooledConnection(String user, String password) throws SQLException
user - 正在连接的数据库用户
password - 用户的密码
PooledConnection对象,这是一个物理连接到数据库,这个
ConnectionPoolDataSource对象表示
SQLException - 如果发生数据库访问错误
SQLFeatureNotSupportedException - 如果JDBC驱动程序不支持此方法
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.