org.jboss.weld.injection.spi

Interface JpaInjectionServices

  • All Superinterfaces:
    Service
    All Known Implementing Classes:
    ForwardingJpaInjectionServices


    public interface JpaInjectionServicesextends 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<EntityManager> registerPersistenceContextInjectionPoint(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<EntityManagerFactory> registerPersistenceUnitInjectionPoint(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
      • resolvePersistenceContext

        @DeprecatedEntityManager 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.
        Resolve the value for the given PersistenceContext injection point
        Parameters:
        injectionPoint - the injection point metadata
        Returns:
        an instance of the entity manager
        Throws:
        IllegalArgumentException - if the injection point is not annotated with javax.persistence.PersistenceContext, or, if the injection point is a method that doesn't follow JavaBean conventions
        IllegalStateException - if no suitable persistence units can be resolved for injection
      • resolvePersistenceUnit

        @DeprecatedEntityManagerFactory 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.
        Resolve the value for the given PersistenceUnit injection point
        Parameters:
        injectionPoint - the injection point metadata
        Returns:
        an instance of the entity manager
        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 for injection

Copyright © 2015. All Rights Reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14