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()
PoolingDataSourceWrapper
close
in interface PoolingDataSourceWrapper
public String getUniqueName()
getUniqueName
in interface PoolingDataSourceWrapper
public String getClassName()
getClassName
in interface PoolingDataSourceWrapper
public Connection getConnection() throws SQLException
getConnection
in interface DataSource
SQLException
public Connection getConnection(String username, String password) throws SQLException
getConnection
in interface DataSource
SQLException
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface Wrapper
SQLException
public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.