org.jboss.weld.injection.spi
Interface ResourceInjectionServices

All Superinterfaces:
Service
All Known Implementing Classes:
ForwardingResourceInjectionServices

public interface ResourceInjectionServices
extends Service

A container should implement this interface to allow the Weld to resolve Resources ResourceInjectionServices is per-module service.

Author:
Pete Muir

Method Summary
 java.lang.Object resolveResource(InjectionPoint injectionPoint)
          Resolve the value for the given @Resource injection point
 java.lang.Object resolveResource(java.lang.String jndiName, java.lang.String mappedName)
          Resolve the value for the given JNDI name and mapped name
 
Methods inherited from interface org.jboss.weld.bootstrap.api.Service
cleanup
 

Method Detail

resolveResource

java.lang.Object resolveResource(InjectionPoint injectionPoint)
Resolve the value for the given @Resource injection point

Parameters:
injectionPoint - the injection point metadata
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

resolveResource

java.lang.Object resolveResource(java.lang.String jndiName,
                                 java.lang.String mappedName)
Resolve the value for the given JNDI name and mapped name

Parameters:
injectionPoint - the injection point metadata
Returns:
an instance of the resource
Throws:
java.lang.IllegalStateException - if no resource can be resolved for injection
java.lang.IllegalArgumentException - if both jndiName and mappedName are null


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