org.jboss.seam.persistence.hibernate
Class HibernateManagedSessionBeanLifecycle
java.lang.Object
org.jboss.seam.persistence.hibernate.HibernateManagedSessionBeanLifecycle
- All Implemented Interfaces:
- ContextualLifecycle<Session>
public class HibernateManagedSessionBeanLifecycle
- extends Object
- implements ContextualLifecycle<Session>
lifecycle for seam managed hibernate sessions
- Author:
- Stuart Douglas
Method Summary |
Session |
create(javax.enterprise.inject.spi.Bean<Session> bean,
javax.enterprise.context.spi.CreationalContext<Session> arg0)
creates the proxy |
void |
destroy(javax.enterprise.inject.spi.Bean<Session> bean,
Session session,
javax.enterprise.context.spi.CreationalContext<Session> arg1)
Callback invoked by a Seam Solder created bean when
Contextual.destroy(Object, CreationalContext) is called. |
protected SessionFactory |
getSessionFactory()
lazily resolve the relevant SessionFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
qualifiers
protected final Annotation[] qualifiers
manager
protected final javax.enterprise.inject.spi.BeanManager manager
HibernateManagedSessionBeanLifecycle
public HibernateManagedSessionBeanLifecycle(Set<Annotation> qualifiers,
ClassLoader loader,
javax.enterprise.inject.spi.BeanManager manager)
create
public Session create(javax.enterprise.inject.spi.Bean<Session> bean,
javax.enterprise.context.spi.CreationalContext<Session> arg0)
- creates the proxy
- Specified by:
create
in interface ContextualLifecycle<Session>
- Parameters:
bean
- the bean initiating the callbackarg0
- the context in which this instance was created
destroy
public void destroy(javax.enterprise.inject.spi.Bean<Session> bean,
Session session,
javax.enterprise.context.spi.CreationalContext<Session> arg1)
- Description copied from interface:
ContextualLifecycle
- Callback invoked by a Seam Solder created bean when
Contextual.destroy(Object, CreationalContext)
is called.
- Specified by:
destroy
in interface ContextualLifecycle<Session>
- Parameters:
bean
- the bean initiating the callbacksession
- the contextual instance to destroyarg1
- the context in which this instance was created
getSessionFactory
protected SessionFactory getSessionFactory()
- lazily resolve the relevant SessionFactory
Copyright © 2011 Seam Framework. All Rights Reserved.