org.jboss.webbeans.ejb.spi
Interface EjbResolver

All Known Implementing Classes:
ForwardingEjbResolver

public interface EjbResolver

A container should implement this interface to allow the Web Beans RI to resolve EJBs, Resources and JPA persistence units TODO This probably needs renaming to EjbLifecycle

Author:
Pete Muir

Field Summary
static java.lang.String PROPERTY_NAME
           
 
Method Summary
 java.lang.Class<? extends java.lang.annotation.Annotation> getEJBAnnotation()
          Get the annotation which defines an @EJB injection point
 java.lang.Class<? extends java.lang.annotation.Annotation> getPersistenceContextAnnotation()
          Get the annotation which defines a @PersistenceContext injection point
 java.lang.Class<? extends java.lang.annotation.Annotation> getResourceAnnotation()
          Get the annotation which defines a @Resource injection point
 java.lang.Object resolveEjb(javax.inject.manager.InjectionPoint injectionPoint, NamingContext namingContext)
          Resolve the value for the given @EJB injection point
 java.lang.Object resolvePersistenceContext(javax.inject.manager.InjectionPoint injectionPoint, NamingContext namingContext)
          Resolve the value for the given @PersistenceContext injection point
 java.lang.Object resolveResource(javax.inject.manager.InjectionPoint injectionPoint, NamingContext namingContext)
          Resolve the value for the given @Resource injection point
 

Field Detail

PROPERTY_NAME

static final java.lang.String PROPERTY_NAME
Method Detail

resolveEjb

java.lang.Object resolveEjb(javax.inject.manager.InjectionPoint injectionPoint,
                            NamingContext namingContext)
Resolve the value for the given @EJB injection point

Parameters:
injectionPoint - the injection point metadata
Returns:
an instance of the EJB
Throws:
java.lang.IllegalArgumentException - if the injection point is not annotated with @EJB, or, if the injection point is a method that doesn't follow JavaBean conventions
java.lang.IllegalStateException - if no EJBs can be resolved for injection

resolvePersistenceContext

java.lang.Object resolvePersistenceContext(javax.inject.manager.InjectionPoint injectionPoint,
                                           NamingContext namingContext)
Resolve the value for the given @PersistenceContext injection point

Parameters:
injectionPoint - the injection point metadata
namingContext - the pluggable Web Beans JNDI lookup facility
Returns:
an instance of the persistence unit
Throws:
java.lang.IllegalArgumentException - if the injection point is not annotated with
java.lang.IllegalStateException - if no suitable persistence units can be resolved for injection

resolveResource

java.lang.Object resolveResource(javax.inject.manager.InjectionPoint injectionPoint,
                                 NamingContext namingContext)
Resolve the value for the given @Resource injection point

Parameters:
injectionPoint - the injection point metadata
namingContext - the pluggable Web Beans JNDI lookup facility
Returns:
an instance of the resource
Throws:
java.lang.IllegalArgumentException - if the injection point is not annotated with @Resource, or, if the injection point is a method that doesn't follow JavaBean conventions
java.lang.IllegalStateException - if no resource can be resolved for injection

getEJBAnnotation

java.lang.Class<? extends java.lang.annotation.Annotation> getEJBAnnotation()
Get the annotation which defines an @EJB injection point

Returns:
the annotation which defines an @EJB injection point

getPersistenceContextAnnotation

java.lang.Class<? extends java.lang.annotation.Annotation> getPersistenceContextAnnotation()
Get the annotation which defines a @PersistenceContext injection point

Returns:
the annotation which defines a @PersistenceContext injection point

getResourceAnnotation

java.lang.Class<? extends java.lang.annotation.Annotation> getResourceAnnotation()
Get the annotation which defines a @Resource injection point

Returns:
the annotation which defines a @Resource injection point


Copyright © 2008-2009. All Rights Reserved.