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

Method Summary
 javax.persistence.EntityManager resolvePersistenceContext(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
          Resolve the value for the given @PersistenceContext injection point
 javax.persistence.EntityManagerFactory resolvePersistenceUnit(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
          Resolve the value for the given @PersistenceUnit injection point
 
Methods inherited from interface org.jboss.weld.bootstrap.api.Service
cleanup
 

Method Detail

resolvePersistenceContext

javax.persistence.EntityManager resolvePersistenceContext(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
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

javax.persistence.EntityManagerFactory resolvePersistenceUnit(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
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 © 2013 Seam Framework. All Rights Reserved.