org.jboss.webbeans.resources.spi
Interface ResourceServices

All Superinterfaces:
Service
All Known Implementing Classes:
ForwardingResourceServices

public interface ResourceServices
extends Service

A container should implement this interface to allow the Web Beans RI to resolve Resources

Author:
Pete Muir

Method Summary
 java.lang.Object resolveResource(javax.inject.manager.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
 

Method Detail

resolveResource

java.lang.Object resolveResource(javax.inject.manager.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. All Rights Reserved.