public class StandaloneResourceInjectionService extends Object implements ResourceInjectionService
| Constructor and Description |
|---|
StandaloneResourceInjectionService(WebBeansContext webBeansContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Any clear functionality.
|
<X,T extends Annotation> |
getResourceReference(ResourceReference<X,T> resourceReference)
Gets resource for the given resource reference.
|
protected WebBeansContext |
getWebBeansContext() |
void |
injectJavaEEResources(Object managedBeanInstance)
Container where OWB is deployed must responsible
for injecting Java EE resources defined by this managed bean.
|
<T> T |
readExternal(javax.enterprise.inject.spi.Bean<T> bean,
ObjectInput in)
delegation of serialization behavior
|
<T> void |
writeExternal(javax.enterprise.inject.spi.Bean<T> bean,
T actualResource,
ObjectOutput out)
delegation of serialization behavior
|
public StandaloneResourceInjectionService(WebBeansContext webBeansContext)
protected WebBeansContext getWebBeansContext()
public <X,T extends Annotation> X getResourceReference(ResourceReference<X,T> resourceReference)
ResourceInjectionServiceThis method is used for getting individual resource references that are defined by the ManagedBean producer fields. For example;
@Produces @MyPersistenceContext PersistenceContext EntityManager manager;
See section 3.5 of the JSR-299 specification.
getResourceReference in interface ResourceInjectionServiceT - resource type, @EJB, @Resource, @WebServiceRef,
@PersistenceContext or @PersistenceUnitpublic void injectJavaEEResources(Object managedBeanInstance)
ResourceInjectionServiceThis is only used for ManagedBean classes. It is not for injection Session Beans or any other Java EE components. Because those are already injected by the related container, for example EJB Container, Web Container etc.
injectJavaEEResources in interface ResourceInjectionServicemanagedBeanInstance - managed bean instancepublic void clear()
ResourceInjectionServiceThis is called by the container at shutdown. Services may clear its caches or any other useful functionality.
clear in interface ResourceInjectionServicepublic <T> void writeExternal(javax.enterprise.inject.spi.Bean<T> bean,
T actualResource,
ObjectOutput out)
throws IOException
writeExternal in interface ResourceInjectionServiceIOExceptionpublic <T> T readExternal(javax.enterprise.inject.spi.Bean<T> bean,
ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ResourceInjectionServiceIOExceptionClassNotFoundExceptionCopyright © 2008–2022 The Apache Software Foundation. All rights reserved.