|
2.50.5 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--interbase.interclient.XADataSource
A factory for XAConnection objects. An object that implements the XADataSource interface is typically registered with a JNDI service provider.
Constructor Summary | |
XADataSource()
|
Method Summary | |
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. |
javax.sql.XAConnection |
getXAConnection()
Attempt to establish a database connection. |
javax.sql.XAConnection |
getXAConnection(String user,
String password)
Attempt to establish a database connection. |
void |
setLoginTimeout(int seconds)
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. |
void |
setLogWriter(PrintWriter out)
Set the log writer for this data source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XADataSource()
Method Detail |
public javax.sql.XAConnection getXAConnection() throws SQLException
getXAConnection
in interface javax.sql.XADataSource
SQLException
- if a database-access error occurs.public javax.sql.XAConnection getXAConnection(String user, String password) throws SQLException
Attempt to establish a database connection.
getXAConnection
in interface javax.sql.XADataSource
user
- the database user on whose behalf the Connection is being madepassword
- the user's passwordSQLException
- if a database-access error occurs.public PrintWriter getLogWriter() throws 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.
getLogWriter
in interface javax.sql.XADataSource
SQLException
- if a database-access error occurs.public void setLogWriter(PrintWriter out) throws 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.
setLogWriter
in interface javax.sql.XADataSource
out
- the new log writer; to disable, set to nullSQLException
- if a database-access error occurs.public void setLoginTimeout(int seconds) throws SQLException
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise it specifies that there is no timeout. When a data source object is created the login timeout is initially zero.
setLoginTimeout
in interface javax.sql.XADataSource
seconds
- the data source login time limitSQLException
- if a database access error occurs.public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface javax.sql.XADataSource
SQLException
- if a database access error occurs.
|
2.50.5 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |