Class Hierarchy    Previous  Next  Index

Class COM.cloudscape.core.BasicDataSource

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

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

A BasicDataSource is an implementation of the javax.sql.DataSource interface. A BasicDataSource object can be obtained via a DataSourceFactory.

A DataSource is a factory for Connection objects. An object that implements the DataSource interface will typically be registered with a JNDI service provider.

See AbstractDataSource for DataSource properties.

See Also:
DataSourceFactory

Constructor Index

 o BasicDataSource()
No-arg constructor.

Method Index

 o getConnection()

Attempt to establish a database connection.

 o getConnection(String, String)

Attempt to establish a database connection.

Constructor Detail

 o BasicDataSource
public BasicDataSource()
          No-arg constructor.

Method Detail

 o getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
          

Attempt to establish a database connection.

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

Attempt to establish a database connection.

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.

  Class Hierarchy    Previous  Next  Index