Class Hierarchy    Previous  Next  Index

Class COM.cloudscape.core.RemoteXaDataSource

java.lang.Object
    |
    +----COM.cloudscape.core.AbstractDataSource
            |
            +----COM.cloudscape.core.RemoteXaDataSource

public class RemoteXaDataSource
extends AbstractDataSource
implements javax.sql.XADataSource, javax.naming.Referenceable, java.io.Serializable
Copyright © 1998-2000, Informix Software, Inc. All rights reserved.

A RemoteXaDataSource is an implementation of the javax.sql.XADataSource interface for RmiJdbc framework. A RemoteXaDataSource object can be obtained via a DataSourceFactory.

A RemoteXADataSource is a factory for server side XAConnection objects. It represents a Resource Manager in a Distibuted Transaction Processing environment. A RemoteXaDataSource object is typically registered with a JNDI service provider.

RemoteXaDataSource is serializable and referenceable.

See AbstractDataSource for DataSource properties.

See Also:
DataSourceFactory

Constructor Index

 o RemoteXaDataSource()
No-arg constructor.

Method Index

 o getLoginTimeout()
Gets the maximum time in seconds that this data-source can wait while attempting to connect to a database.
 o getLogWriter()

Get the log writer for this data-source.

 o getXAConnection()

Attempt to establish a database connection through RmiJdbc.

 o getXAConnection(String, String)

Attempt to establish a database connection through RmiJdbc.

 o setLoginTimeout(int)

Sets the maximum time in seconds that this data-source will wait while attempting to connect to a database.

 o setLogWriter(PrintWriter)

Set the log writer for this data-source.

Constructor Detail

 o RemoteXaDataSource
public RemoteXaDataSource()
          No-arg constructor.

Method Detail

 o getXAConnection
public javax.sql.XAConnection getXAConnection() throws java.sql.SQLException
          

Attempt to establish a database connection through RmiJdbc.

Returns:
a Connection to the database
Throws:
java.sql.SQLException - if a database-access error occurs.
 o getXAConnection
public javax.sql.XAConnection getXAConnection(java.lang.String user,
                                    java.lang.String password) throws java.sql.SQLException
          

Attempt to establish a database connection through RmiJdbc.

Parameters:
user - the database user on whose behalf the Connection is being made
password - the user's password
Returns:
a Connection to the database
Throws:
java.sql.SQLException - if a database-access error occurs.
 o getLoginTimeout
public int getLoginTimeout() throws java.sql.SQLException
          Gets the maximum time in seconds that this data-source can wait while attempting to connect to a database. A value of zero means that the timeout is the default system timeout if there is one; otherwise it means that there is no timeout. When a data-source object is created, the login timeout is initially zero.
Returns:
the data-source login time limit
Throws:
java.sql.SQLException - if a database access error occurs.
Overrides:
getLoginTimeout in class AbstractDataSource
 o setLoginTimeout
public void setLoginTimeout(int seconds) throws java.sql.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.

Parameters:
seconds - the data-source login time limit
Throws:
java.sql.SQLException - if a database access error occurs.
Overrides:
setLoginTimeout in class AbstractDataSource
 o getLogWriter
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 are 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.

Returns:
the log writer for this data-source, NULL if disabled
Throws:
java.sql.SQLException - if a database-access error occurs.
Overrides:
getLogWriter in class AbstractDataSource
 o setLogWriter
public void setLogWriter(java.io.PrintWriter out) 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 are 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.

Parameters:
out - the new log writer; to disable, set to NULL
Throws:
java.sql.SQLException - if a database-access error occurs.
Overrides:
setLogWriter in class AbstractDataSource

  Class Hierarchy    Previous  Next  Index