Package javax.sql
Interface CommonDataSource
-
- All Known Subinterfaces:
ConnectionPoolDataSource,DataSource
public interface CommonDataSourceInterface that defines the methods which are common between DataSource, XADataSource and ConnectionPoolDataSource.- Since:
- 1.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetLoginTimeout()While attempting to connect to a database, this method get the maximum time in seconds that this data source can wait.PrintWritergetLogWriter()Retrieves a log writer which is a character output stream to which all logging and tracing messages for this data source will be printed.voidsetLoginTimeout(int seconds)While attempting to connect to a database, this method set the maximum time in seconds that this data source can wait.voidsetLogWriter(PrintWriter out)Set a log writer which is a character output stream to which all logging and tracing messages for this data source will be printed.
-
-
-
Method Detail
-
getLoginTimeout
int getLoginTimeout() throws SQLExceptionWhile attempting to connect to a database, this method get the maximum time in seconds that this data source can wait.- Returns:
- An integer value to indicate the maximum time.
- Throws:
SQLException- An exception threw when a data base access error occurs.
-
getLogWriter
PrintWriter getLogWriter() throws SQLException
Retrieves a log writer which is a character output stream to which all logging and tracing messages for this data source will be printed.- Returns:
- The PrintWriter object for this DataSource.
- Throws:
SQLException- An exception threw when a data base access error occurs.
-
setLoginTimeout
void setLoginTimeout(int seconds) throws SQLExceptionWhile attempting to connect to a database, this method set the maximum time in seconds that this data source can wait.- Parameters:
seconds- An integer value to indicate the maximum time.- Throws:
SQLException- An exception threw when a data base access error occurs.
-
setLogWriter
void setLogWriter(PrintWriter out) throws SQLException
Set a log writer which is a character output stream to which all logging and tracing messages for this data source will be printed.- Parameters:
out- The PrintWriter object for this DataSource.- Throws:
SQLException
-
-