public interface ResourceInjectionServices extends Service
ResourceInjectionServices
is per-module service.Modifier and Type | Method and Description |
---|---|
ResourceReferenceFactory<Object> |
registerResourceInjectionPoint(javax.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.
|
Object |
resolveResource(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Deprecated.
Instead of calling this method at runtime, Weld should register every resource injection point at bootstrap
using
registerResourceInjectionPoint(InjectionPoint) and use the returned factory for producing
injectable instances at runtime. |
Object |
resolveResource(String jndiName,
String mappedName)
Deprecated.
Instead of calling this method at runtime, Weld should register every resource injection point at bootstrap
using
registerResourceInjectionPoint(String, String) and use the returned factory for producing
injectable instances at runtime. |
ResourceReferenceFactory<Object> registerResourceInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
ResourceReferenceFactory
is returned which may be used at runtime for creating instances of the
resource.injectionPoint
- the injection point metadatajavax.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 resolvedResourceReferenceFactory<Object> registerResourceInjectionPoint(String jndiName, String mappedName)
ResourceReferenceFactory
is returned which may be used at runtime
for creating instances of the resource.jndiName
- JNDI namemappedName
- mapped nameIllegalStateException
- if no resource can be resolvedIllegalArgumentException
- if both jndiName and mappedName are null@Deprecated Object resolveResource(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
registerResourceInjectionPoint(InjectionPoint)
and use the returned factory for producing
injectable instances at runtime.injectionPoint
- the injection point metadataIllegalArgumentException
- if the injection point is not annotated with @Resource, or, if the injection point is a
method that doesn't follow JavaBean conventionsIllegalStateException
- if no resource can be resolved for injection@Deprecated Object resolveResource(String jndiName, String mappedName)
registerResourceInjectionPoint(String, String)
and use the returned factory for producing
injectable instances at runtime.jndiName
- JNDI namemappedName
- mapped nameIllegalStateException
- if no resource can be resolved for injectionIllegalArgumentException
- if both jndiName and mappedName are nullCopyright © 2008-2015. All Rights Reserved.