|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A factory for XAConnection objects. An object that implements the XADataSource interface is typically registered with a JNDI service provider.
Method Summary | |
int |
getLoginTimeout()
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. |
java.io.PrintWriter |
getLogWriter()
Get the log writer for this data source. |
XAConnection (src) |
getXAConnection()
Attempt to establish a database connection. |
XAConnection (src) |
getXAConnection(java.lang.String user,
java.lang.String password)
Attempt to establish a database connection. |
void |
setLoginTimeout(int sec)
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. |
void |
setLogWriter(java.io.PrintWriter printWriter)
Set the log writer for this data source. |
Method Detail |
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
Get the log writer for this data source.
The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a data source object is created the log writer is initially null, in other words, logging is disabled.
java.sql.SQLException
- - if a database-access error occurs.public int getLoginTimeout() throws java.sql.SQLException
java.sql.SQLException
- - if a database-access error occurs.public XAConnection (src) getXAConnection() throws java.sql.SQLException
java.sql.SQLException
- - if a database-access error occurs.public XAConnection (src) getXAConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
user
- - the database user on whose behalf the Connection is being madepassword
- - the user's password
java.sql.SQLException
- - if a database-access error occurs.public void setLogWriter(java.io.PrintWriter printWriter) throws java.sql.SQLException
Set the log writer for this data source.
The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a data source object is created the log writer is initially null, in other words, logging is disabled.
printWriter
- - the new log writer; to disable, set to null
java.sql.SQLException
- - if a database-access error occurs.public void setLoginTimeout(int sec) throws java.sql.SQLException
sec
- - the data source login time limit
java.sql.SQLException
- - if a database-access error occurs.
|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |