public final class PoolingDataSourceWrapperImpl extends Object implements PoolingDataSourceWrapper
| Constructor and Description |
|---|
PoolingDataSourceWrapperImpl(String uniqueName,
String dsClassName,
Properties driverProperties)
This constructor creates a PoolingDataSource using internally
BasicManagedDataSource with its default
pooling parameters. |
PoolingDataSourceWrapperImpl(String uniqueName,
String dsClassName,
Properties driverProperties,
Properties poolingProperties)
This constructor creates a PoolingDataSource using internally
BasicManagedDataSource. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the data source; as a result, the data source will stop providing connections and will be unregistered
from JNDI context.
|
String |
getClassName() |
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
String |
getUniqueName() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
<T> T |
unwrap(Class<T> iface) |
public PoolingDataSourceWrapperImpl(String uniqueName, String dsClassName, Properties driverProperties)
BasicManagedDataSource with its default
pooling parameters.uniqueName - Data Source unique name. Serves for registration to JNDI.dsClassName - Name of a class implementing XADataSource available in a JDBC driver on a classpath.driverProperties - Properties of a database driver.public PoolingDataSourceWrapperImpl(String uniqueName, String dsClassName, Properties driverProperties, Properties poolingProperties)
BasicManagedDataSource.uniqueName - Data Source unique name. Serves for registration to JNDI.dsClassName - Name of a class implementing XADataSource available in a JDBC driver on a classpath.driverProperties - Properties of a database driver.poolingProperties - Properties of a pooling data source. See BasicManagedDataSource for details.public void close()
PoolingDataSourceWrapperclose in interface PoolingDataSourceWrapperpublic String getUniqueName()
getUniqueName in interface PoolingDataSourceWrapperpublic String getClassName()
getClassName in interface PoolingDataSourceWrapperpublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionCopyright © 2001–2020 JBoss by Red Hat. All rights reserved.