public class JDBCDataSourceFactory extends Object implements ObjectFactory
JDBCDataSource for plain
connections for the end user.
JDBCPool for pooled plain
connections for the end user.
JDBCPooledDataSource for
PooleConnection objects used
by external connection pooling software.
JDBCXADataSource for
XAConnection objects used by external connection pooling software.| Constructor and Description |
|---|
JDBCDataSourceFactory() |
| Modifier and Type | Method and Description |
|---|---|
static DataSource |
createDataSource(Properties props)
Static method to create a JDBCDataSource instance using the
given properties for url, user, password, etc.
|
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable environment)
Creates a DataSource object using the javax.naming.Reference object
specified.
|
public static DataSource createDataSource(Properties props) throws Exception
props - propertiesException - on any errorpublic Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
The Reference object's class name should be one of the four supported data source class names and it must support the properties, database, user and password. It may optionally support the loginTimeout property. HyperSQL's JDBCPooledDataSource and JDBCXADataSource object are intended as factories used by a connection pooling DataSource.
JDBCDataSource is a factory for normal connections and can be accessed directly by user applications.
JDBCPool is a connection pool accessed directly by user applications.
getObjectInstance in interface ObjectFactoryobj - The reference information used in creating a
Datasource object.name - ignorednameCtx - ignoredenvironment - ignoredException - is thrown if database or user is null or invalidCopyright © 2001 - 2017 HSQL Development Group.