org.jboss.portal.cms.hibernate.state
Class Tools
java.lang.Object
org.jboss.portal.cms.hibernate.state.Tools
public class Tools
- extends java.lang.Object
Static state is evil.
Created on Aug 29, 2006
A Tool for performing some Hibernate related utilities. This is designed to work in both managed as well as non-managed environments
- Author:
- Sohil Shah
Constructor Summary |
Tools()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Tools
public Tools()
destroy
public static void destroy()
init
public static void init(java.lang.String jndiName)
getSessionFactory
public static org.hibernate.SessionFactory getSessionFactory()
getCurrentSession
public static org.hibernate.Session getCurrentSession()
- Returns:
getOpenSession
public static org.hibernate.Session getOpenSession()
- Returns:
closeSession
public static void closeSession(org.hibernate.Session session)
- Parameters:
session
-