Package org.jboss.weld.injection.spi
Interface JpaInjectionServices
-
- All Superinterfaces:
Service
- All Known Implementing Classes:
ForwardingJpaInjectionServices
public interface JpaInjectionServices extends Service
A container should implement this interface to allow the Weld RI to resolve JPA persistence units and discover entitiesJpaInjectionServicesis a per-module service.- Author:
- Pete Muir, Jozef Hartinger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
registerPersistenceContextInjectionPoint
ResourceReferenceFactory<javax.persistence.EntityManager> registerPersistenceContextInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Register a persistence context injection point. The implementation validates the injection point. If the validation passes, an instance ofResourceReferenceFactoryis returned which may be used at runtime for creating instances of the resource.- Parameters:
injectionPoint- the injection point metadata- Returns:
- factory for obtaining
EntityManagerinstances - Throws:
IllegalArgumentException- if the injection point is not annotated withPersistenceContext, if the injection point is a method that doesn't follow JavaBean conventions or if the injectionIllegalStateException- if no suitable persistence units can be resolved
-
registerPersistenceUnitInjectionPoint
ResourceReferenceFactory<javax.persistence.EntityManagerFactory> registerPersistenceUnitInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Register a persistence unit injection point. The implementation validates the injection point. If the validation passes, an instance ofResourceReferenceFactoryis returned which may be used at runtime for creating instances of the resource.- Parameters:
injectionPoint- the injection point metadata- Returns:
- factory for obtaining
EntityManagerFactoryinstances - Throws:
IllegalArgumentException- if the injection point is not annotated withPersistenceUnit, or, if the injection point is a method that doesn't follow JavaBean conventionsIllegalStateException- if no suitable persistence units can be resolved
-
-