|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.castor.jdo.engine.DatabaseRegistry
| Method Summary | |
static void |
clear()
Reset all database configurations. |
static AbstractConnectionFactory |
getConnectionFactory(java.lang.String name)
Get the ConnectionFactory for the given database name. |
static boolean |
hasDatabaseRegistries()
Check if any database configuration has been loaded. |
static boolean |
isDatabaseRegistred(java.lang.String name)
Check if database configuration with given name has been loaded. |
static void |
loadDatabase(org.xml.sax.InputSource source,
org.xml.sax.EntityResolver resolver,
java.lang.ClassLoader loader)
Instantiates a ConnectionFactory from the JDO configuration file. |
static void |
loadDatabase(JdoConf jdoConf,
org.xml.sax.EntityResolver resolver,
java.lang.ClassLoader loader,
java.lang.String baseURI)
Creates a entry for every database and associates them with their name in a map. |
static void |
loadDatabase(java.lang.String name,
java.lang.String engine,
javax.sql.DataSource datasource,
org.exolab.castor.mapping.Mapping mapping,
javax.transaction.TransactionManager txManager)
Instantiates a DataSourceConnectionFactory with given name, engine, datasource and mapping. |
static void |
unloadDatabase(java.lang.String name)
Unload the database configuration with given name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void loadDatabase(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 static void loadDatabase(org.xml.sax.InputSource source,
org.xml.sax.EntityResolver resolver,
java.lang.ClassLoader loader)
throws org.exolab.castor.mapping.MappingException
source - InputSource pointing to the JDO configuration.resolver - An entity resolver.loader - A class loader
org.exolab.castor.mapping.MappingException - If the database cannot be instantiated/loadeed.
public static void loadDatabase(JdoConf jdoConf,
org.xml.sax.EntityResolver resolver,
java.lang.ClassLoader loader,
java.lang.String baseURI)
throws org.exolab.castor.mapping.MappingException
true in castor.properties file. If above property is set
to false it will instantiate all databases only when they are
needed.
jdoConf - An in-memory jdo configuration.resolver - An entity resolver.loader - A class loaderbaseURI - The base URL for the mapping
org.exolab.castor.mapping.MappingException - If the database cannot be instantiated/loadeed.public static boolean hasDatabaseRegistries()
true if a databases configuration has been loaded.public static boolean isDatabaseRegistred(java.lang.String name)
name - Name of the database to check if loaded.
true if databases configuration has been loaded.
public static AbstractConnectionFactory getConnectionFactory(java.lang.String name)
throws org.exolab.castor.mapping.MappingException
name - Name of the database configuration.
org.exolab.castor.mapping.MappingException - If database can not be instantiated.public static void clear()
public static void unloadDatabase(java.lang.String name)
name - Name of the database to be unloaded.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||