Class ResourceBean<X,T extends Annotation>

All Implemented Interfaces:
jakarta.enterprise.context.spi.Contextual<X>, jakarta.enterprise.inject.spi.Bean<X>, jakarta.enterprise.inject.spi.BeanAttributes<X>, jakarta.enterprise.inject.spi.PassivationCapable, OwbBean<X>

public class ResourceBean<X,T extends Annotation> extends ProducerFieldBean<X>
  • Constructor Details

    • ResourceBean

      public ResourceBean(InjectionTargetBean<?> ownerComponent, org.apache.webbeans.spi.api.ResourceReference<X,T> resourceReference, jakarta.enterprise.inject.spi.BeanAttributes<X> beanAttributes, Class<X> beanClass, jakarta.enterprise.inject.spi.ProducerFactory<X> producerFactory)
  • Method Details

    • getReference

      public org.apache.webbeans.spi.api.ResourceReference<X,T> getReference()
    • getActualInstance

      public X getActualInstance()
      Called after deserialization to get a new instance for some type of resource bean instance that are not serializable. TODO: broken if producer is wrapped but surely better than actually serializing
      Returns:
      a new instance of this resource bean.
    • isPassivationCapable

      public boolean isPassivationCapable()
      Description copied from interface: OwbBean
      True if passivation capable false otherwise.
      Specified by:
      isPassivationCapable in interface OwbBean<X>
      Overrides:
      isPassivationCapable in class ProducerFieldBean<X>
      Returns:
      true if this bean is passivation capable