public class ExternalDataSource extends Object implements DataSource
When a connection is requested it gets a connection from the pool and attach such connection to the current transaction. When the transaction completes the data source connection is automatically completed as well.
| Modifier and Type | Field and Description |
|---|---|
protected DataSourceEntry |
dataSourceEntry |
protected static org.slf4j.Logger |
log |
protected String |
name |
| Constructor and Description |
|---|
ExternalDataSource() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
getAutoCommit(Connection conn) |
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
DataSourceEntry |
getDataSourceEntry() |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
String |
getName() |
Logger |
getParentLogger() |
boolean |
isDisableAutoCommit() |
boolean |
isWrapperFor(Class<?> c) |
protected void |
setAutoCommit(Connection conn,
boolean autocommit) |
void |
setDataSourceEntry(DataSourceEntry dataSourceEntry) |
void |
setDisableAutoCommit(boolean disableAutoCommit) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
void |
setName(String name) |
<T> T |
unwrap(Class<T> c) |
protected static transient org.slf4j.Logger log
protected String name
protected DataSourceEntry dataSourceEntry
public String getName()
public void setName(String name)
public void setDataSourceEntry(DataSourceEntry dataSourceEntry)
public DataSourceEntry getDataSourceEntry()
public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic boolean isDisableAutoCommit()
public void setDisableAutoCommit(boolean disableAutoCommit)
public Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Logger getParentLogger()
getParentLogger in interface CommonDataSourceprotected boolean getAutoCommit(Connection conn)
protected void setAutoCommit(Connection conn, boolean autocommit)
public boolean isWrapperFor(Class<?> c)
isWrapperFor in interface WrapperCopyright © 2012–2015 JBoss by Red Hat. All rights reserved.