com.sssw.srv.dbpool
Class AgoDataSourceFactory
java.lang.Object
|
+--com.sssw.srv.dbpool.AgoDataSourceFactory
- public class AgoDataSourceFactory
- 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.
Method Summary |
static javax.sql.DataSource |
createDataSource(String dataSourceName,
String jdbcDriverClassName,
String jdbcUrl,
String userName,
String password)
Returns a generic DataSource. |
static javax.sql.DataSource |
createDataSource(String dataSourceName,
String jdbcDriverClassName,
String jdbcUrl,
String userName,
String password,
int initConnCount,
int maxConnCount)
Returns a generic 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 generic DataSource. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
AgoDataSourceFactory
public AgoDataSourceFactory()
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 generic DataSource.
- Parameters:
dataSourceName
- the internal name of the datasource used to identify it in
error logs and exceptionsjdbcDriverClassName
- 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
- db user name under which to connect to the databasepassword
- password under which to connect to the databaseinitConnCount
- indicates the number of connections with the above username/password
that should be opened when the pool is first createdmaxConnCount
- 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,passwowrd) 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 generic 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 a generic DataSource. Disallows any named subpools and sets the maximum size
of the pool to 10, with initial size of 1.