public class TopiaHibernateSessionRegistry extends Object
| Modifier and Type | Field and Description |
|---|---|
protected WeakHashMap<org.hibernate.Session,WeakReference<TopiaPersistenceContext>> |
registry |
| Constructor and Description |
|---|
TopiaHibernateSessionRegistry() |
| Modifier and Type | Method and Description |
|---|---|
TopiaPersistenceContext |
getPersistenceContext(org.hibernate.Session session)
Look for the TopiaPersistenceContext based on the given Hibernate session
|
void |
register(org.hibernate.Session session,
TopiaPersistenceContext persistenceContext)
Register the Session ↔ TopiaPersistenceContext couple
|
void |
unregister(org.hibernate.Session session)
Removes the Session ↔ TopiaPersistenceContext association from the registry
|
protected WeakHashMap<org.hibernate.Session,WeakReference<TopiaPersistenceContext>> registry
public void register(org.hibernate.Session session,
TopiaPersistenceContext persistenceContext)
session - the currently used SessionpersistenceContext - the current TopiaPersistenceContext using this Sessionpublic TopiaPersistenceContext getPersistenceContext(org.hibernate.Session session)
session - the Hibernate Session to usepublic void unregister(org.hibernate.Session session)
session - the Hibernate Session to removeCopyright © 2004–2017 CodeLutin. All rights reserved.