org.apache.log.output.db
Class DefaultDataSource
java.lang.Object
org.apache.log.output.db.DefaultDataSource
- DataSource
public class DefaultDataSource
extends java.lang.Object
implements DataSource
A basic datasource that doesn't do any pooling but just wraps
around default mechanisms.
- Peter Donald
Connection | getConnection() - Attempt to establish a database connection.
|
Connection | getConnection(String username, String password) - Attempt to establish a database connection.
|
PrintWriter | getLogWriter() - Get the log writer for this data source.
|
int | getLoginTimeout() - Gets the maximum time in seconds that this data source can wait while
attempting to connect to a database.
|
void | setLogWriter(PrintWriter logWriter)
|
void | setLoginTimeout(int loginTimeout) - Sets the maximum time in seconds that this data source will wait
while attempting to connect to a database.
|
DefaultDataSource
public DefaultDataSource(String url,
String username,
String password)
getConnection
public Connection getConnection()
throws SQLException
Attempt to establish a database connection.
- the Connection
getConnection
public Connection getConnection(String username,
String password)
throws SQLException
Attempt to establish a database connection.
- the Connection
getLogWriter
public PrintWriter getLogWriter()
throws SQLException
Get the log writer for this data source.
- the LogWriter
getLoginTimeout
public int getLoginTimeout()
throws SQLException
Gets the maximum time in seconds that this data source can wait while
attempting to connect to a database.
- the login time
setLogWriter
public void setLogWriter(PrintWriter logWriter)
throws SQLException
setLoginTimeout
public void setLoginTimeout(int loginTimeout)
throws SQLException
Sets the maximum time in seconds that this data source will wait
while attempting to connect to a database.
loginTimeout
- the loging timeout in seconds
"Copyright B) 2001 Apache Jakarta Project. All Rights Reserved."