org.castor.jdo.engine
public final class DataSourceConnectionFactory extends AbstractConnectionFactory
Since: 0.9.9
Version: $Revision: 1.6 $ $Date: 2005/10/13 08:52:17 $
Constructor Summary | |
---|---|
DataSourceConnectionFactory(String name, String engine, DataSource datasource, Mapping mapping, TransactionManager txManager)
Constructs a new DataSourceConnectionFactory with given name, engine, mapping
and datasource. | |
DataSourceConnectionFactory(JdoConf jdoConf, int index, Mapping mapping)
Constructs a new DataSourceConnectionFactory with given database and mapping.
|
Method Summary | |
---|---|
static String | buildMethodName(String name)
Build the name of the method to set the parameter value of the given name. |
Connection | createConnection() |
protected void | initializeFactory() |
static DataSource | loadDataSource(Database database, ClassLoader loader)
Initialize JDBC DataSource instance with the given database configuration
instances and the given class loader.
|
static void | setParameters(DataSource dataSource, Param[] params)
Set all the parameters of the given array at the given datasource by calling
one of the set methods of the datasource.
|
Parameters: name The Name of the database configuration. engine The Name of the persistence factory to use. datasource The preconfigured datasource to use for creating connections. mapping The previously loaded mapping. txManager The transaction manager to use.
Throws: MappingException If LockEngine could not be initialized.
Parameters: jdoConf An in-memory jdo configuration. index Index of the database configuration inside the jdo configuration. mapping The mapping to load.
Parameters: name The name of the parameter.
Returns: The name of the method to set the value of this parameter.
See Also: createConnection
See Also: initializeFactory
Parameters: database Database configuration. loader ClassLoader to use.
Returns: The initalized DataSource.
Throws: MappingException Problem related to analysing the JDO configuration.
Parameters: dataSource The datasource to set the parameters on. params The parameters to set on the datasource.
Throws: MappingException If one of the parameters could not be set.