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 entitiesJpaInjectionServices
is a per-module service.- Author:
- Pete Muir, Jozef Hartinger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourceReferenceFactory<jakarta.persistence.EntityManager>
registerPersistenceContextInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint injectionPoint)
Register a persistence context injection point.ResourceReferenceFactory<jakarta.persistence.EntityManagerFactory>
registerPersistenceUnitInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint injectionPoint)
Register a persistence unit injection point.
-
-
-
Method Detail
-
registerPersistenceContextInjectionPoint
ResourceReferenceFactory<jakarta.persistence.EntityManager> registerPersistenceContextInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint injectionPoint)
Register a persistence context injection point. The implementation validates the injection point. If the validation passes, an instance ofResourceReferenceFactory
is returned which may be used at runtime for creating instances of the resource.- Parameters:
injectionPoint
- the injection point metadata- Returns:
- factory for obtaining
EntityManager
instances - 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<jakarta.persistence.EntityManagerFactory> registerPersistenceUnitInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint injectionPoint)
Register a persistence unit injection point. The implementation validates the injection point. If the validation passes, an instance ofResourceReferenceFactory
is returned which may be used at runtime for creating instances of the resource.- Parameters:
injectionPoint
- the injection point metadata- Returns:
- factory for obtaining
EntityManagerFactory
instances - 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
-
-