org.jboss.seam.persistence.hibernate
Class HibernateManagedSessionBeanLifecycle

java.lang.Object
  extended by 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

Field Summary
protected  javax.enterprise.inject.spi.BeanManager manager
           
protected  Annotation[] qualifiers
           
 
Constructor Summary
HibernateManagedSessionBeanLifecycle(Set<Annotation> qualifiers, ClassLoader loader, javax.enterprise.inject.spi.BeanManager manager)
           
 
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
 

Field Detail

qualifiers

protected final Annotation[] qualifiers

manager

protected final javax.enterprise.inject.spi.BeanManager manager
Constructor Detail

HibernateManagedSessionBeanLifecycle

public HibernateManagedSessionBeanLifecycle(Set<Annotation> qualifiers,
                                            ClassLoader loader,
                                            javax.enterprise.inject.spi.BeanManager manager)
Method Detail

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 callback
arg0 - 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 callback
session - the contextual instance to destroy
arg1 - the context in which this instance was created

getSessionFactory

protected SessionFactory getSessionFactory()
lazily resolve the relevant SessionFactory



Copyright © 2011 Seam Framework. All Rights Reserved.