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 entities JpaInjectionServices is a per-module service.
    Author:
    Pete Muir, Jozef Hartinger
    • 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 of ResourceReferenceFactory 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 with PersistenceContext, if the injection point is a method that doesn't follow JavaBean conventions or if the injection
        IllegalStateException - 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 of ResourceReferenceFactory 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 with PersistenceUnit, or, if the injection point is a method that doesn't follow JavaBean conventions
        IllegalStateException - if no suitable persistence units can be resolved