Package org.jboss.weld.injection.spi
Interface ResourceInjectionServices
-
- All Superinterfaces:
Service
- All Known Implementing Classes:
AbstractResourceServices
,ForwardingResourceInjectionServices
public interface ResourceInjectionServices extends Service
A container should implement this interface to allow the Weld to resolve ResourcesResourceInjectionServices
is per-module service.- Author:
- Pete Muir, Jozef Hartinger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourceReferenceFactory<Object>
registerResourceInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint injectionPoint)
Register a resource injection point.ResourceReferenceFactory<Object>
registerResourceInjectionPoint(String jndiName, String mappedName)
Register a resource injection point with the given JNDI name and mapped name.
-
-
-
Method Detail
-
registerResourceInjectionPoint
ResourceReferenceFactory<Object> registerResourceInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint injectionPoint)
Register a resource injection point. The implementation validates the injection point. If the validation passes, an instance ofResourceReferenceFactory
is returned which may be used at runtime for creating instances of the resource.- Parameters:
injectionPoint
- the injection point metadata- Returns:
- resource factory
- Throws:
jakarta.enterprise.inject.spi.DefinitionException
- if the injection point is not annotated with @Resource, if the injection point is a method that doesn't follow JavaBean conventions or if the injection point type does not match the resource typeIllegalStateException
- if no resource can be resolved
-
registerResourceInjectionPoint
ResourceReferenceFactory<Object> registerResourceInjectionPoint(String jndiName, String mappedName)
Register a resource injection point with the given JNDI name and mapped name. The implementation validates the injection point. If the validation passes, an instance ofResourceReferenceFactory
is returned which may be used at runtime for creating instances of the resource.- Parameters:
jndiName
- JNDI namemappedName
- mapped name- Returns:
- resource factory
- Throws:
IllegalStateException
- if no resource can be resolvedIllegalArgumentException
- if both jndiName and mappedName are null
-
-