org.jboss.seam.persistence
Class ManagedPersistenceContextExtension
java.lang.Object
org.jboss.seam.persistence.ManagedPersistenceContextExtension
- All Implemented Interfaces:
- Extension
public class ManagedPersistenceContextExtension
- extends Object
- implements Extension
Extension the wraps producer methods/fields that produce an entity manager
factory to turn them into Seam Managed Persistence Contexts.
- Author:
- Stuart Douglas
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManagedPersistenceContextExtension
public ManagedPersistenceContextExtension()
beforeBeanDiscovery
public void beforeBeanDiscovery(@Observes
BeforeBeanDiscovery event)
processAnnotatedType
public <T> void processAnnotatedType(@Observes
ProcessAnnotatedType<T> event,
BeanManager manager)
- loops through the fields on an AnnotatedType looking for a @PersistnceUnit
producer field that is annotated
ExtensionManaged. Then a corresponding
smpc bean is created and registered. Any scope declaration on the producer
are removed as this is not supported by the spec
For non-ee environments this extension also bootstraps @PersistenceUnit
producer fields
afterBeanDiscovery
public void afterBeanDiscovery(@Observes
AfterBeanDiscovery event)
Copyright © 2011 Seam Framework. All Rights Reserved.