org.jboss.seam.persistence.hibernate
Class HibernateManagedPersistenceContextBeanLifecycle

java.lang.Object
  extended by org.jboss.seam.persistence.hibernate.HibernateManagedPersistenceContextBeanLifecycle
All Implemented Interfaces:
org.jboss.weld.extensions.bean.ContextualLifecycle<org.hibernate.Session>

public class HibernateManagedPersistenceContextBeanLifecycle
extends Object
implements org.jboss.weld.extensions.bean.ContextualLifecycle<org.hibernate.Session>

lifecycle for seam managed hibernate sessions

Author:
Stuart Douglas

Field Summary
protected  javax.enterprise.inject.spi.BeanManager manager
           
protected  Annotation[] qualifiers
           
 
Constructor Summary
HibernateManagedPersistenceContextBeanLifecycle(Set<Annotation> qualifiers, ClassLoader loader, javax.enterprise.inject.spi.BeanManager manager)
           
 
Method Summary
 org.hibernate.Session create(javax.enterprise.inject.spi.Bean<org.hibernate.Session> bean, javax.enterprise.context.spi.CreationalContext<org.hibernate.Session> arg0)
          creates the proxy
 void destroy(javax.enterprise.inject.spi.Bean<org.hibernate.Session> bean, org.hibernate.Session session, javax.enterprise.context.spi.CreationalContext<org.hibernate.Session> arg1)
           
protected  org.hibernate.SessionFactory getSessionFactory()
          lazily resolve the relevant EMF
 
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

HibernateManagedPersistenceContextBeanLifecycle

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

create

public org.hibernate.Session create(javax.enterprise.inject.spi.Bean<org.hibernate.Session> bean,
                                    javax.enterprise.context.spi.CreationalContext<org.hibernate.Session> arg0)
creates the proxy

Specified by:
create in interface org.jboss.weld.extensions.bean.ContextualLifecycle<org.hibernate.Session>

destroy

public void destroy(javax.enterprise.inject.spi.Bean<org.hibernate.Session> bean,
                    org.hibernate.Session session,
                    javax.enterprise.context.spi.CreationalContext<org.hibernate.Session> arg1)
Specified by:
destroy in interface org.jboss.weld.extensions.bean.ContextualLifecycle<org.hibernate.Session>

getSessionFactory

protected org.hibernate.SessionFactory getSessionFactory()
lazily resolve the relevant EMF



Copyright © 2010 Seam Framework. All Rights Reserved.