Package javax.sql
Interface CommonDataSource
- All Known Subinterfaces:
ConnectionPoolDataSource,DataSource
public interface CommonDataSource
Interface that defines the methods which are common between DataSource,
XADataSource and ConnectionPoolDataSource.
- Since:
- 1.6
-
Method Summary
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 Details
-
getLoginTimeout
While 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
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
While 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
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
-