public class HibernateSessionSourceImpl extends Object implements HibernateSessionSource
Constructor and Description |
---|
HibernateSessionSourceImpl(org.slf4j.Logger logger,
List<HibernateConfigurer> hibernateConfigurers) |
Modifier and Type | Method and Description |
---|---|
org.hibernate.Session |
create()
Creates a new session using the
SessionFactory created at service startup. |
org.hibernate.cfg.Configuration |
getConfiguration()
Returns the final configuration used to create the
SessionFactory . |
org.hibernate.SessionFactory |
getSessionFactory()
Returns the SessionFactory from which Hibernate sessions are created.
|
void |
listenForShutdown(RegistryShutdownHub hub) |
public HibernateSessionSourceImpl(org.slf4j.Logger logger, List<HibernateConfigurer> hibernateConfigurers)
@PostInjection public void listenForShutdown(RegistryShutdownHub hub)
public org.hibernate.Session create()
HibernateSessionSource
SessionFactory
created at service startup.create
in interface HibernateSessionSource
public org.hibernate.SessionFactory getSessionFactory()
HibernateSessionSource
getSessionFactory
in interface HibernateSessionSource
public org.hibernate.cfg.Configuration getConfiguration()
HibernateSessionSource
SessionFactory
. The configuration is immutable.getConfiguration
in interface HibernateSessionSource
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.