|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ora.jsp.sql.DataSourceWrapper
This class is a wrapper implementing the JDBC 2.0 DataSource interface, used to make the ConnectionPool class look like a JDBC 2.0 DataSource.
Field Summary | |
private java.lang.String |
driverClassName
|
private int |
initialConnections
|
private java.lang.String |
password
|
private ConnectionPool |
pool
|
private java.lang.String |
url
|
private java.lang.String |
user
|
Constructor Summary | |
DataSourceWrapper()
|
Method Summary | |
private void |
createConnectionPool()
Create a Connection pool based on the configuration properties. |
java.sql.Connection |
getConnection()
Gets a connection from the pool and returns it wrapped in a ConnectionWrapper. |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
Always throws an SQLException. |
int |
getLoginTimeout()
Always throws an SQLException. |
java.io.PrintWriter |
getLogWriter()
Always throws an SQLException. |
void |
returnConnection(java.sql.Connection conn)
Returns a Connection to the pool. |
void |
setDriverClassName(java.lang.String driverClassName)
Sets the JDBC driver class name for the pool. |
void |
setInitialConnections(int initialConnections)
Sets the number of connections to create when the pool is created. |
void |
setLoginTimeout(int seconds)
Always throws an SQLException. |
void |
setLogWriter(java.io.PrintWriter out)
Always throws an SQLException. |
void |
setPassword(java.lang.String password)
Sets the user account password for the pool. |
void |
setUrl(java.lang.String url)
Sets the JDBC URL for the pool. |
void |
setUser(java.lang.String user)
Sets the user account for the pool. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private ConnectionPool pool
private java.lang.String driverClassName
private java.lang.String url
private java.lang.String user
private java.lang.String password
private int initialConnections
Constructor Detail |
public DataSourceWrapper()
Method Detail |
public void setDriverClassName(java.lang.String driverClassName)
public void setUrl(java.lang.String url)
public void setUser(java.lang.String user)
public void setPassword(java.lang.String password)
public void setInitialConnections(int initialConnections)
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public void returnConnection(java.sql.Connection conn)
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public int getLoginTimeout() throws java.sql.SQLException
getLoginTimeout
in interface javax.sql.DataSource
java.sql.SQLException
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
getLogWriter
in interface javax.sql.DataSource
java.sql.SQLException
public void setLoginTimeout(int seconds) throws java.sql.SQLException
setLoginTimeout
in interface javax.sql.DataSource
java.sql.SQLException
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException
setLogWriter
in interface javax.sql.DataSource
java.sql.SQLException
private void createConnectionPool() throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |