All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.db.ArrayDataSource

java.lang.Object
   |
   +----org.xmlmiddleware.utils.Pool
           |
           +----org.xmlmiddleware.db.ConnectionPool
                   |
                   +----org.xmlmiddleware.db.ArrayDataSource

public class ArrayDataSource
extends ConnectionPool
implements DataSource
Implements a JDBC 2.0 DataSource for an array of connections.

Version:
2.0
Author:
Sean Walter, 2001

Constructor Index

 o ArrayDataSource(Connection)
Create a new ArrayDataSource.
 o ArrayDataSource(Connection[])
Create a new ArrayDataSource.

Method Index

 o getConnection()
Get the next available connection from the array.
 o getConnection(String, String)
Get the next available connection from the array.
 o getLoginTimeout()
Always returns -1.
 o getLogWriter()
Always returns null.
 o setLoginTimeout(int)
Login timeout parameter ignored.
 o setLogWriter(PrintWriter)
Log writer parameter ignored.

Constructors

 o ArrayDataSource
 public ArrayDataSource(Connection conn)
Create a new ArrayDataSource. (Convenience method for single connection.)

Parameters:
conn - The connection.
 o ArrayDataSource
 public ArrayDataSource(Connection conns[])
Create a new ArrayDataSource.

Parameters:
s - conns An array of connections.

Methods

 o getConnection
 public Connection getConnection() throws SQLException
Get the next available connection from the array.

 o getConnection
 public Connection getConnection(String username,
                                 String password) throws SQLException
Get the next available connection from the array.

The user name and password are ignored.

 o getLogWriter
 public PrintWriter getLogWriter() throws SQLException
Always returns null.

 o setLogWriter
 public void setLogWriter(PrintWriter out) throws SQLException
Log writer parameter ignored.

 o setLoginTimeout
 public void setLoginTimeout(int seconds) throws SQLException
Login timeout parameter ignored.

 o getLoginTimeout
 public int getLoginTimeout() throws SQLException
Always returns -1.


All Packages  Class Hierarchy  This Package  Previous  Next  Index