Dashboard Builder Commons 6.2.0.Beta2

org.jboss.dashboard.database
Class NonPooledDataSource

java.lang.Object
  extended by 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.


Field Summary
protected  boolean autoCommit
           
protected  String driver
           
protected  int isolation
           
protected  int loginTimeOut
           
protected  String password
           
protected  PrintWriter printWriter
           
protected  String url
           
protected  String user
           
 
Constructor Summary
NonPooledDataSource()
           
 
Method Summary
protected  boolean getAutoCommit(Connection conn)
           
 Connection getConnection()
           
 Connection getConnection(String username, String password)
           
 String getDriver()
           
 int getIsolation()
           
 int getLoginTimeout()
           
 PrintWriter getLogWriter()
           
 Logger getParentLogger()
           
 String getPassword()
           
 String getUrl()
           
 String getUser()
           
 boolean isAutoCommit()
           
 boolean isWrapperFor(Class<?> iface)
           
 void setAutoCommit(boolean autoCommit)
           
protected  void setAutoCommit(Connection conn, boolean autocommit)
           
 void setDriver(String driver)
           
protected  void setIsolation(Connection conn, int isolation)
           
 void setIsolation(int isolation)
           
 void setLoginTimeout(int seconds)
           
 void setLogWriter(PrintWriter out)
           
 void setPassword(String password)
           
 void setUrl(String url)
           
 void setUser(String user)
           
<T> T
unwrap(Class<T> iface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

NonPooledDataSource

public NonPooledDataSource()
Method Detail

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)

Dashboard Builder Commons 6.2.0.Beta2

Copyright © 2012-2014 JBoss by Red Hat. All Rights Reserved.