org.perfectjpattern.jee.integration.dao
Class HibernateCurrentSessionStrategy
java.lang.Object
org.perfectjpattern.jee.integration.dao.HibernateCurrentSessionStrategy
- All Implemented Interfaces:
- IStrategy, ISessionStrategy
public final class HibernateCurrentSessionStrategy
- extends Object
- implements ISessionStrategy
Concrete simple implementation of ISessionStrategy
corresponding to
SessionFactory.getCurrentSession()
This strategy is mandated by the Hibernate configuration value specified in
property current_session_context_class
e.g. thread
value will default to using ThreadLocalSessionContext
which is the default and preferred method in
Java SE environments.
- Version:
- $Revision: 1.0 $Date: Feb 8, 2009 5:24:51 PM $
- Author:
- Giovanni Azua
-
-
Method Summary |
ISession |
getSession()
Returns the adapted JPA implementation-specific ISession |
void |
shutdown()
Shutdown the underlying provider of Session instances |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateCurrentSessionStrategy
public HibernateCurrentSessionStrategy()
HibernateCurrentSessionStrategy
public HibernateCurrentSessionStrategy(org.hibernate.SessionFactory aSessionFactory)
shutdown
public void shutdown()
- Shutdown the underlying provider of
Session
instances
- Specified by:
shutdown
in interface ISessionStrategy
getSession
public ISession getSession()
- Returns the adapted JPA implementation-specific
ISession
- Specified by:
getSession
in interface ISessionStrategy
- Returns:
- adapted JPA implementation-specific
ISession
Copyright © 2007-2009. All Rights Reserved.