SilverStream
Application Server 3.5

com.sssw.srv.dbpool
Class Ago1dbXADataSourceFactory

java.lang.Object
 |
 +--com.sssw.srv.dbpool.Ago1dbXADataSourceFactory

public class Ago1dbXADataSourceFactory
extends Object

This factory provides a number of static methods that create an instance of an object that implements the javax.sql.DataSource interface given the number of SilverStream-specific parameters.


Constructor Summary
Ago1dbXADataSourceFactory()
           
 
Method Summary
static javax.sql.DataSource createDataSource(String dataSourceName, String jdbcDriverClassName, String jdbcUrl, String userName, String password)
          Returns datasource.
static javax.sql.DataSource createDataSource(String dataSourceName, String jdbcDriverClassName, String jdbcUrl, String userName, String password, int initConnCount, int maxConnCount)
          Returns a datasource.
static javax.sql.DataSource createDataSource(String dataSourceName, String jdbcDriverClassName, String jdbcUrl, String userName, String password, int initConnCount, int maxConnCount, int namedPoolCount, int namedPoolMaxSize)
          Returns a datasource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ago1dbXADataSourceFactory

public Ago1dbXADataSourceFactory()
Method Detail

createDataSource

public static javax.sql.DataSource createDataSource(String dataSourceName,
                                                    String jdbcDriverClassName,
                                                    String jdbcUrl,
                                                    String userName,
                                                    String password,
                                                    int initConnCount,
                                                    int maxConnCount,
                                                    int namedPoolCount,
                                                    int namedPoolMaxSize)
                                             throws SQLException
Returns a datasource.
Parameters:
dataSourceName - the internal name of the datasource used to identify it in error logs and exceptions
jdbcDriverClassName - the name of the class that implements the JDBC driver used to create connections for this datasource, e.g., "com.sssw.jdbc.oracle.Driver"
jdbcUrl - connect string for the driver, for example "jdbc:sssw:oracle:heartstopper"
userName - database user name under which to connect to the database
password - database password under which to connect to the database
initConnCount - indicates the number of connections with the above username/password that should be opened when the pool is first created
maxConnCount - defines the maximum number of connections that can be opened for the default user by calling getConnection() on a returned datasource object,
namedPoolCount - indicates how many non-default users can be supported. Note that connections for a non-default user are obtained by calling getConnection(username,password) on the returned DataSource object.
namedPoolMaxSize - defines the maximum number of connections that can be opened for each non-default user

createDataSource

public static javax.sql.DataSource createDataSource(String dataSourceName,
                                                    String jdbcDriverClassName,
                                                    String jdbcUrl,
                                                    String userName,
                                                    String password,
                                                    int initConnCount,
                                                    int maxConnCount)
                                             throws SQLException
Returns a datasource. The datasource disallows any named subpools.

createDataSource

public static javax.sql.DataSource createDataSource(String dataSourceName,
                                                    String jdbcDriverClassName,
                                                    String jdbcUrl,
                                                    String userName,
                                                    String password)
                                             throws SQLException
Returns datasource. The datasource disallows any named subpools and sets the maximum size of the pool to 10, with an initial size of 1.

SilverStream
Application Server 3.5