public abstract class UnspecifiedSessionFactoryProvider extends AbstractSessionFactoryProvider implements DataConnectionProvider, HibernateDatasourceConstants
HibernateDatasourceConstants.DatabaseConcept
Modifier and Type | Field and Description |
---|---|
protected org.hibernate.cfg.Configuration |
configuration
Configuration instance
|
private static org.slf4j.Logger |
LOGGER |
protected org.hibernate.SessionFactory |
sessionFactory
SessionFactory instance
|
CONNECTION_PROVIDER_IDENTIFIER
HIBERNATE_ANNOTADED_CLASSES, HIBERNATE_DEFAULT_OGM_PACKAGE, HIBERNATE_DIRECTORY, HIBERNATE_DRIVER_CLASS, HIBERNATE_MAPPING_CORE_PATH, HIBERNATE_MAPPING_EREPORTING_CONCEPT_OBSERVATION_PATH, HIBERNATE_MAPPING_EXTENSION, HIBERNATE_MAPPING_EXTENSION_READONLY, HIBERNATE_MAPPING_I18N_PATH, HIBERNATE_MAPPING_OLD_CONCEPT_OBSERVATION_PATH, HIBERNATE_MAPPING_PATH, HIBERNATE_MAPPING_SERIES_CONCEPT_OBSERVATION_PATH, HIBERNATE_MAPPING_SERIES_CONCEPT_PATH, HIBERNATE_MAPPING_TRANSACTIONAL_PATH, HIBERNATE_RESOURCES, HIBERNATPE_MAPPING_OLD_CONCEPT_PATH, OGM_CONNECTION_PROVIDER_IDENTIFIER, OGM_DATASOURCE_DAO_IDENTIFIER, ORM_CONNECTION_PROVIDER_IDENTIFIER, ORM_DATASOURCE_DAO_IDENTIFIER, PATH_SEPERATOR, PROVIDED_JDBC
Constructor and Description |
---|
UnspecifiedSessionFactoryProvider() |
Modifier and Type | Method and Description |
---|---|
protected abstract org.hibernate.cfg.Configuration |
getConfiguration(Properties properties) |
org.hibernate.Session |
getConnection()
Get a data source connection
|
protected DatasourceCallback |
getDatasourceCallback(Properties properties) |
protected org.hibernate.SessionFactory |
getSessionFactory() |
void |
initialize(Properties properties)
Initializes the connection provider.
|
void |
returnConnection(Object connection)
Return the connection to the provider
|
cleanup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cleanup
getConnectionProviderIdentifier
private static final org.slf4j.Logger LOGGER
protected org.hibernate.SessionFactory sessionFactory
protected org.hibernate.cfg.Configuration configuration
public org.hibernate.Session getConnection() throws ConnectionProviderException
ConnectionProvider
getConnection
in interface ConnectionProvider
ConnectionProviderException
public void returnConnection(Object connection)
ConnectionProvider
returnConnection
in interface ConnectionProvider
connection
- Connectionprotected DatasourceCallback getDatasourceCallback(Properties properties)
protected org.hibernate.SessionFactory getSessionFactory()
getSessionFactory
in class AbstractSessionFactoryProvider
public void initialize(Properties properties) throws ConfigurationException
ConnectionProvider
initialize
in interface ConnectionProvider
properties
- the propertiesConfigurationException
- if the initialization failedprotected abstract org.hibernate.cfg.Configuration getConfiguration(Properties properties)
Copyright © 2012-2015 52north.org. All Rights Reserved.