public class ReportingHeaderSQLiteSessionFactory extends AbstractSessionFactoryProvider
Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_DATABASE_NAME |
private Properties |
defaultProperties |
private ReentrantLock |
lock |
private static org.slf4j.Logger |
LOG |
private org.hibernate.SessionFactory |
sessionFactory |
CONNECTION_PROVIDER_IDENTIFIER
Constructor and Description |
---|
ReportingHeaderSQLiteSessionFactory() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
private org.hibernate.SessionFactory |
createSessionFactory(Properties properties) |
org.hibernate.Session |
getConnection()
Get a data source connection
|
String |
getConnectionProviderIdentifier() |
private String |
getFilename() |
protected org.hibernate.SessionFactory |
getSessionFactory() |
void |
initialize(Properties properties)
Initializes the connection provider.
|
void |
returnConnection(Object connection)
Return the connection to the provider
|
private static final org.slf4j.Logger LOG
protected static final String DEFAULT_DATABASE_NAME
private final Properties defaultProperties
private final ReentrantLock lock
private org.hibernate.SessionFactory sessionFactory
private String getFilename()
protected org.hibernate.SessionFactory getSessionFactory()
getSessionFactory
in class AbstractSessionFactoryProvider
private org.hibernate.SessionFactory createSessionFactory(Properties properties)
public org.hibernate.Session getConnection() throws ConnectionProviderException
ConnectionProvider
ConnectionProviderException
public void returnConnection(Object connection)
ConnectionProvider
connection
- Connectionpublic void initialize(Properties properties) throws ConfigurationException
ConnectionProvider
properties
- the propertiesConfigurationException
- if the initialization failedpublic String getConnectionProviderIdentifier()
public void cleanup()
cleanup
in interface Cleanupable
cleanup
in class AbstractSessionFactoryProvider
Copyright © 2012-2015 52north.org. All Rights Reserved.