org.jboss.dashboard.database
Class NonPooledDataSource
java.lang.Object
org.jboss.dashboard.database.NonPooledDataSource
- All Implemented Interfaces:
- Wrapper, CommonDataSource, DataSource
public class NonPooledDataSource
- extends Object
- implements DataSource
A data source implementation that bounds every connection to the underlying thread.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
printWriter
protected PrintWriter printWriter
loginTimeOut
protected int loginTimeOut
url
protected String url
user
protected String user
password
protected String password
driver
protected String driver
isolation
protected int isolation
autoCommit
protected boolean autoCommit
_classInterfacesMap
protected transient Map<Class,Class[]> _classInterfacesMap
- A cache of java class interfaces
NonPooledDataSource
public NonPooledDataSource()
getUrl
public String getUrl()
setUrl
public void setUrl(String url)
getUser
public String getUser()
setUser
public void setUser(String user)
getPassword
public String getPassword()
setPassword
public void setPassword(String password)
getDriver
public String getDriver()
setDriver
public void setDriver(String driver)
getIsolation
public int getIsolation()
setIsolation
public void setIsolation(int isolation)
isAutoCommit
public boolean isAutoCommit()
setAutoCommit
public void setAutoCommit(boolean autoCommit)
getLoginTimeout
public int getLoginTimeout()
throws SQLException
- Specified by:
getLoginTimeout in interface CommonDataSource
- Throws:
SQLException
setLoginTimeout
public void setLoginTimeout(int seconds)
throws SQLException
- Specified by:
setLoginTimeout in interface CommonDataSource
- Throws:
SQLException
getLogWriter
public PrintWriter getLogWriter()
throws SQLException
- Specified by:
getLogWriter in interface CommonDataSource
- Throws:
SQLException
setLogWriter
public void setLogWriter(PrintWriter out)
throws SQLException
- Specified by:
setLogWriter in interface CommonDataSource
- Throws:
SQLException
isWrapperFor
public boolean isWrapperFor(Class<?> iface)
throws SQLException
- Specified by:
isWrapperFor in interface Wrapper
- Throws:
SQLException
unwrap
public <T> T unwrap(Class<T> iface)
throws SQLException
- Specified by:
unwrap in interface Wrapper
- Throws:
SQLException
getConnection
public Connection getConnection(String username,
String password)
throws SQLException
- Specified by:
getConnection in interface DataSource
- Throws:
SQLException
getConnection
public Connection getConnection()
throws SQLException
- Specified by:
getConnection in interface DataSource
- Throws:
SQLException
getParentLogger
public Logger getParentLogger()
getAutoCommit
protected boolean getAutoCommit(Connection conn)
setAutoCommit
protected void setAutoCommit(Connection conn,
boolean autocommit)
setIsolation
protected void setIsolation(Connection conn,
int isolation)
createConnectionProxy
public Connection createConnectionProxy(Connection conn)
throws SQLException
- Throws:
SQLException
getClassInterfaces
protected Class[] getClassInterfaces(Class clazz)
createStatementProxy
protected Statement createStatementProxy(Statement stmt)
throws SQLException
- Throws:
SQLException
createPreparedStatementProxy
protected Statement createPreparedStatementProxy(PreparedStatement stmt,
String sql)
throws SQLException
- Throws:
SQLException
Copyright © 2012-2013 JBoss by Red Hat. All Rights Reserved.