4 Replies Latest reply on Feb 9, 2017 1:25 AM by tremes

    What subtype of ProcessBean should be fired for an extension?

    ljnelson

      I see that the CDI specification says in section 11.5, where "service provider" means a portable extension:

      For each service provider, the container must provide a bean of scope @ApplicationScoped and qualifier @Default, supporting injection of a reference to the service provider instance. The bean types of this bean include the class of the service provider and all superclasses and interfaces.

      I can observe that a ProcessBean event is fired when this bean is created.

       

      But the javadocs on ProcessBean say:

      The event object type depends upon what kind of bean was discovered:

      • For a managed bean with bean class X, the container must raise an event of type ProcessManagedBean.
      • For a session bean with bean class X, the container must raise an event of type ProcessSessionBean.
      • For a producer method with method return type X of a bean with bean class T, the container must raise an event of type ProcessProducerMethod.
      • For a producer field with field type X of a bean with bean class T, the container must raise an event of type ProcessProducerField.
      • For a custom implementation of Bean, the container must raise an event of type ProcessSyntheticBean.

      A bean representing a portable extension instance, provided by the container, would seem to fit none of these.

       

      Using common sense, it seems like I should get a ProcessSyntheticBean event here, right?