|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.castor.jdo.engine.AbstractConnectionFactory
org.castor.jdo.engine.DataSourceConnectionFactory
| Field Summary |
| Fields inherited from class org.castor.jdo.engine.AbstractConnectionFactory |
GENERIC_ENGINE |
| Constructor Summary | |
DataSourceConnectionFactory(JdoConf jdoConf,
int index,
org.exolab.castor.mapping.Mapping mapping)
Constructs a new DataSourceConnectionFactory with given database and mapping. |
|
DataSourceConnectionFactory(java.lang.String name,
java.lang.String engine,
javax.sql.DataSource datasource,
org.exolab.castor.mapping.Mapping mapping,
javax.transaction.TransactionManager txManager)
Constructs a new DataSourceConnectionFactory with given name, engine, mapping and datasource. |
|
| Method Summary | |
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(Database database,
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. |
| Methods inherited from class org.castor.jdo.engine.AbstractConnectionFactory |
getDatabase, getEngine, getMapping, getName, getTransactionManager, initialize |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DataSourceConnectionFactory(java.lang.String name,
java.lang.String engine,
javax.sql.DataSource datasource,
org.exolab.castor.mapping.Mapping mapping,
javax.transaction.TransactionManager txManager)
throws org.exolab.castor.mapping.MappingException
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.
org.exolab.castor.mapping.MappingException - If LockEngine could not be initialized.
public DataSourceConnectionFactory(JdoConf jdoConf,
int index,
org.exolab.castor.mapping.Mapping mapping)
jdoConf - An in-memory jdo configuration.index - Index of the database configuration inside the jdo configuration.mapping - The mapping to load.| Method Detail |
public static javax.sql.DataSource loadDataSource(Database database,
java.lang.ClassLoader loader)
throws org.exolab.castor.mapping.MappingException
database - Database configuration.loader - ClassLoader to use.
org.exolab.castor.mapping.MappingException - Problem related to analysing the JDO configuration.
public static void setParameters(javax.sql.DataSource dataSource,
Param[] params)
throws org.exolab.castor.mapping.MappingException
dataSource - The datasource to set the parameters on.params - The parameters to set on the datasource.
org.exolab.castor.mapping.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 org.exolab.castor.mapping.MappingException
initializeFactory in class AbstractConnectionFactoryorg.exolab.castor.mapping.MappingException - If concrete factory could not be initialized.AbstractConnectionFactory.initializeFactory()
public java.sql.Connection createConnection()
throws java.sql.SQLException
java.sql.SQLException - If the JDBC connection cannot be created.ConnectionFactory.createConnection()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||