ConnectionFactorypublic final class DataSourceConnectionFactory extends java.lang.Object implements ConnectionFactory
| Constructor | Description | 
|---|---|
DataSourceConnectionFactory(DataSource dataSource,
                           boolean useProxies,
                           java.lang.ClassLoader loader) | 
 Constructs a new DataSourceConnectionFactory with given database and mapping. 
 | 
DataSourceConnectionFactory(javax.sql.DataSource datasource,
                           boolean useProxies) | 
 Constructs a new DataSourceConnectionFactory with given name, engine, mapping
 and datasource. 
 | 
| Modifier and Type | Method | Description | 
|---|---|---|
static java.lang.String | 
buildMethodName(java.lang.String name) | 
 Build the name of the method to set the parameter value of the given name. 
 | 
java.sql.Connection | 
createConnection() | 
 Creates a new JDBC Connection instance. 
 | 
void | 
initializeFactory() | 
 Initialize the concrete factory. 
 | 
static javax.sql.DataSource | 
loadDataSource(DataSource confDataSource,
              java.lang.ClassLoader loader) | 
 Initialize JDBC DataSource instance with the given database configuration
 instances and the given class loader. 
 | 
static void | 
setParameters(javax.sql.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. 
 | 
public DataSourceConnectionFactory(javax.sql.DataSource datasource,
                                   boolean useProxies)
datasource - The preconfigured datasource to use for creating connections.useProxies - Wrap JDBC connections by proxies?public DataSourceConnectionFactory(DataSource dataSource,
                                   boolean useProxies,
                                   java.lang.ClassLoader loader)
dataSource - DataSouce configuration.useProxies - Wrap JDBC connections by proxies?loader - ClassLoader to use.public static javax.sql.DataSource loadDataSource(DataSource confDataSource,
                                                  java.lang.ClassLoader loader)
                                           throws MappingException
confDataSource - DataSource configuration.loader - ClassLoader to use.MappingException - Problem related to analysing the JDO configuration.public static void setParameters(javax.sql.DataSource dataSource,
                                 Param[] params)
                          throws MappingException
dataSource - The datasource to set the parameters on.params - The parameters to set on the datasource.MappingException - If one of the parameters could not be set.public static java.lang.String buildMethodName(java.lang.String name)
name - The name of the parameter.public void initializeFactory()
                       throws MappingException
initializeFactory in interface ConnectionFactoryMappingException - If concrete factory could not be initialized.public java.sql.Connection createConnection()
                                     throws java.sql.SQLException
createConnection in interface ConnectionFactoryjava.sql.SQLException - If the JDBC connection cannot be created.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com