public interface JpaInjectionServices extends Service
JpaInjectionServices is a per-module service.| Modifier and Type | Method and Description |
|---|---|
ResourceReferenceFactory<EntityManager> |
registerPersistenceContextInjectionPoint(InjectionPoint injectionPoint)
Register a persistence context injection point.
|
ResourceReferenceFactory<EntityManagerFactory> |
registerPersistenceUnitInjectionPoint(InjectionPoint injectionPoint)
Register a persistence unit injection point.
|
EntityManager |
resolvePersistenceContext(InjectionPoint injectionPoint)
Deprecated.
Instead of calling this method at runtime, Weld should register every persistence context injection point at
bootstrap using
registerPersistenceContextInjectionPoint(InjectionPoint) and use the returned
factory for producing injectable instances at runtime. |
EntityManagerFactory |
resolvePersistenceUnit(InjectionPoint injectionPoint)
Deprecated.
Instead of calling this method at runtime, Weld should register every persistence unit injection point at
bootstrap using
registerPersistenceUnitInjectionPoint(InjectionPoint) and use the returned factory
for producing injectable instances at runtime. |
ResourceReferenceFactory<EntityManager> registerPersistenceContextInjectionPoint(InjectionPoint injectionPoint)
ResourceReferenceFactory is returned which may be used at runtime for creating instances
of the resource.injectionPoint - the injection point metadataEntityManager instancesIllegalArgumentException - if the injection point is not annotated with PersistenceContext,
if the injection point is a method that doesn't follow JavaBean conventions or if the injectionIllegalStateException - if no suitable persistence units can be resolvedResourceReferenceFactory<EntityManagerFactory> registerPersistenceUnitInjectionPoint(InjectionPoint injectionPoint)
ResourceReferenceFactory is returned which may be used at runtime for creating instances of the
resource.injectionPoint - the injection point metadataEntityManagerFactory instancesIllegalArgumentException - if the injection point is not annotated with PersistenceUnit, or,
if the injection point is a method that doesn't follow JavaBean conventionsIllegalStateException - if no suitable persistence units can be resolved@Deprecated EntityManager resolvePersistenceContext(InjectionPoint injectionPoint)
registerPersistenceContextInjectionPoint(InjectionPoint) and use the returned
factory for producing injectable instances at runtime.PersistenceContext injection pointinjectionPoint - the injection point metadataIllegalArgumentException - if the injection point is not annotated with javax.persistence.PersistenceContext, or,
if the injection point is a method that doesn't follow JavaBean conventionsIllegalStateException - if no suitable persistence units can be resolved for injection@Deprecated EntityManagerFactory resolvePersistenceUnit(InjectionPoint injectionPoint)
registerPersistenceUnitInjectionPoint(InjectionPoint) and use the returned factory
for producing injectable instances at runtime.PersistenceUnit injection pointinjectionPoint - the injection point metadataIllegalArgumentException - if the injection point is not annotated with PersistenceUnit, or, if the injection
point is a method that doesn't follow JavaBean conventionsIllegalStateException - if no suitable persistence units can be resolved for injectionCopyright © 2015. All Rights Reserved.