public interface JpaInjectionServices extends Service
JpaInjectionServices
is a per-module service.Modifier and Type | Method and Description |
---|---|
ResourceReferenceFactory<javax.persistence.EntityManager> |
registerPersistenceContextInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Register a persistence context injection point.
|
ResourceReferenceFactory<javax.persistence.EntityManagerFactory> |
registerPersistenceUnitInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Register a persistence unit injection point.
|
javax.persistence.EntityManager |
resolvePersistenceContext(javax.enterprise.inject.spi.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. |
javax.persistence.EntityManagerFactory |
resolvePersistenceUnit(javax.enterprise.inject.spi.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<javax.persistence.EntityManager> registerPersistenceContextInjectionPoint(javax.enterprise.inject.spi.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<javax.persistence.EntityManagerFactory> registerPersistenceUnitInjectionPoint(javax.enterprise.inject.spi.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 javax.persistence.EntityManager resolvePersistenceContext(javax.enterprise.inject.spi.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 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 javax.persistence.EntityManagerFactory resolvePersistenceUnit(javax.enterprise.inject.spi.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 © 2008-2015. All Rights Reserved.