Interface ResourceInjectionService


  • public interface ResourceInjectionService
    This service is responsible for injecting the Java EE injectable resources. Please see the Section 5 of the Java EE specification.
    • Method Detail

      • injectJavaEEResources

        void injectJavaEEResources​(Object managedBeanInstance)
        Container where OWB is deployed must responsible for injecting Java EE resources defined by this managed bean. This includes, field and method injections. How to inject those resources are defined by Java EE specification.

        This 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.

        Parameters:
        managedBeanInstance - managed bean instance
      • getResourceReference

        <X,​T extends Annotation> X getResourceReference​(ResourceReference<X,​T> resourceReference)
        Gets resource for the given resource reference.

        This method is used for getting individual resource references that are defined by the ManagedBean producer fields. For example;

        Type Parameters:
        T - resource type, @EJB, @Resource, @WebServiceRef, @PersistenceContext or @PersistenceUnit
        Parameters:
        resourceReference -
        Returns:
        resource for the given resource reference
      • clear

        void clear()
        Any clear functionality.

        This is called by the container at shutdown. Services may clear its caches or any other useful functionality.

      • writeExternal

        default <T> void writeExternal​(jakarta.enterprise.inject.spi.Bean<T> bean,
                                       T actualResource,
                                       ObjectOutput out)
                                throws IOException
        Deprecated.
        has not been used since 1.1.x. We can finally remove it some day
        delegation of serialization behavior
        Throws:
        IOException