org.apache.log.output.db
public class DefaultDataSource extends Object implements DataSource
Field Summary | |
---|---|
int | m_loginTimeout |
PrintWriter | m_logWriter |
String | m_password |
String | m_url |
String | m_username |
Constructor Summary | |
---|---|
DefaultDataSource(String url, String username, String password) |
Method Summary | |
---|---|
Connection | getConnection()
Attempt to establish a database connection.
|
Connection | getConnection(String username, String password)
Attempt to establish a database connection.
|
int | getLoginTimeout()
Gets the maximum time in seconds that this data source can wait while
attempting to connect to a database.
|
PrintWriter | getLogWriter()
Get the log writer for this data source.
|
boolean | isWrapperFor(Class<?> iface) |
void | setLoginTimeout(int loginTimeout)
Sets the maximum time in seconds that this data source will wait
while attempting to connect to a database.
|
void | setLogWriter(PrintWriter logWriter) |
<T> T | unwrap(Class<T> iface) |
Returns: the Connection
Returns: the Connection
Returns: the login time
Returns: the LogWriter
Parameters: loginTimeout the loging timeout in seconds