org.jboss.soa.esb.helpers.persist
Class HibernateSessionFactory
java.lang.Object
org.jboss.soa.esb.helpers.persist.HibernateSessionFactory
public class HibernateSessionFactory
- extends java.lang.Object
HibernateSessionFactory is a singleton for hibernate's SessionFactory object. The Listener
uses JNDI to store the Hibernate SessionFactory.
- Since:
- Version 4.2
- Author:
- tcunning@redhat.com
Method Summary |
static void |
close(org.hibernate.cfg.Configuration f_cfg)
Close the SessionFactory stored in JNDI at SESSION_FACTORY_NAME. |
static org.hibernate.SessionFactory |
getInstance(org.hibernate.cfg.Configuration f_cfg)
|
static boolean |
isAlive(org.hibernate.cfg.Configuration f_cfg)
Checks whether the SessionFactory exists within JNDI and whether it is closed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HIBERNATE_JNDI
public static final java.lang.String HIBERNATE_JNDI
- See Also:
- Constant Field Values
getInstance
public static org.hibernate.SessionFactory getInstance(org.hibernate.cfg.Configuration f_cfg)
throws ConfigurationException
- Throws:
ConfigurationException
isAlive
public static boolean isAlive(org.hibernate.cfg.Configuration f_cfg)
- Checks whether the SessionFactory exists within JNDI and whether it is closed.
- Parameters:
f_cfg
- Hibernate Configuration - needed for SESSION_FACTORY_NAME
- Returns:
- whether the Hibernate SessionFactory is in JNDI and is alive
close
public static void close(org.hibernate.cfg.Configuration f_cfg)
- Close the SessionFactory stored in JNDI at SESSION_FACTORY_NAME.
- Parameters:
f_cfg
- hibernate configuration