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 entities JpaInjectionServices is a per-module service.

Author:
Pete Muir, Jozef Hartinger

Method Summary
 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.
 
Methods inherited from interface org.jboss.weld.bootstrap.api.Service
cleanup
 

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 of ResourceReferenceFactory is returned which may be used at runtime for creating instances of the resource.

Parameters:
injectionPoint - the injection point metadata
Returns:
an instance of the entity manager
Throws:
IllegalArgumentException - if the injection point is not annotated with
IllegalStateException - 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 of ResourceReferenceFactory is returned which may be used at runtime for creating instances of the resource.

Parameters:
injectionPoint - the injection point metadata
Returns:
an instance of the entity manager
Throws:
IllegalArgumentException - if the injection point is not annotated with
IllegalStateException - if no suitable persistence units can be resolved

resolvePersistenceContext

@Deprecated
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.

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
IllegalStateException - if no suitable persistence units can be resolved for injection

resolvePersistenceUnit

@Deprecated
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.

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
IllegalStateException - if no suitable persistence units can be resolved for injection


Copyright © 2008-2012 Seam Framework. All Rights Reserved.