org.jboss.seam.persistence.hibernate
Class HibernateManagedPersistenceContextExtension
java.lang.Object
org.jboss.seam.persistence.hibernate.HibernateManagedPersistenceContextExtension
- All Implemented Interfaces:
- javax.enterprise.inject.spi.Extension
public class HibernateManagedPersistenceContextExtension
- extends Object
- implements javax.enterprise.inject.spi.Extension
Extension the wraps producer methods/fields that produce an entity manager to
turn them into Seam Managed Persistence Contexts.
- Author:
- Stuart Douglas
|
Method Summary |
void |
afterBeanDiscovery(javax.enterprise.inject.spi.AfterBeanDiscovery event)
|
|
processAnnotatedType(javax.enterprise.inject.spi.ProcessAnnotatedType<T> event,
javax.enterprise.inject.spi.BeanManager manager)
loops through the fields on an AnnotatedType looking for a SessionFactory
producer that is annotated SeamManaged. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateManagedPersistenceContextExtension
public HibernateManagedPersistenceContextExtension()
processAnnotatedType
public <T> void processAnnotatedType(@Observes
javax.enterprise.inject.spi.ProcessAnnotatedType<T> event,
javax.enterprise.inject.spi.BeanManager manager)
- loops through the fields on an AnnotatedType looking for a SessionFactory
producer that is annotated
SeamManaged. Then a corresponding smpc
bean is created and registered. The producers scope will be changed to
ApplicationScoped (or @Dependent if it is created using resource
injection) to ensure that the SMPC is only created once
afterBeanDiscovery
public void afterBeanDiscovery(@Observes
javax.enterprise.inject.spi.AfterBeanDiscovery event)
Copyright © 2010 Seam Framework. All Rights Reserved.