Class ResourceBean<X,​T extends Annotation>

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

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

      • ResourceBean

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

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