Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [servlet-dev] Pruning managed beans from the component specs

On 07/06/2023 01:12, Stuart Douglas wrote:


On Tue, 6 Jun 2023 at 17:35, Mark Thomas <markt@xxxxxxxxxx <mailto:markt@xxxxxxxxxx>> wrote:

    On 05/06/2023 18:43, Emily Jiang via servlet-dev wrote:
     > We discussed this internally regarding the pruning Managed Beans.
    It was
     > brought to my attention that in fact Managed Beans was not
    removed from
     > Jakarta EE 10 Platform Spec
     >
    <https://jakarta.ee/specifications/platform/10/jakarta-platform-spec-10.0.html#managed-beans-2-0-requirements <https://jakarta.ee/specifications/platform/10/jakarta-platform-spec-10.0.html#managed-beans-2-0-requirements>>. Instead, it just deprecated this spec. This might be an oversight. Managed Beans spec used to be under Web Profile. In Jakarta EE 10, this spec was indeed removed from Jakarta EE 10 Web Profile spec. <https://jakarta.ee/specifications/webprofile/10/jakarta-webprofile-spec-10.0.html <https://jakarta.ee/specifications/webprofile/10/jakarta-webprofile-spec-10.0.html>> However, it was still listed under the Jakarta EE 10 Web Profile release in this <https://jakarta.ee/release/10/ <https://jakarta.ee/release/10/>> diagram. The diagram needs to be updated to reflect the current status.
     >
     > In EE 11, we should completely remove Managed Beans Spec from
    Jakarta EE
     > 11 Platform spec and remove all of the references.
     >
     > Thanks
     > Emily

    Could someone more familiar with this confirm what this means for the
    Servlet specification.

    Do we just need to remove the one reference to the managed bean
    specification from the Servlet spec doc?

    The reference to @PostConstruct below concerns me. Is there any
    expectation that removing the Managed Bean spec will have any impact on
    section 15.5 of the Servlet specification (Annotations and Resource
    Injection)?

No.

Managed beans provided two things, explicit managed bean components using @ManagedBean (which AFAIK was never widely used), and the ability to have extended managed bean components. If a component is a managed bean it has an explicit name and corresponding JNDI binding, and the ability to use callbacks and interceptors.

AFAIK EJBs are the only objects explicitly called out as being managed beans as per their spec: https://jakarta.ee/specifications/enterprise-beans/4.0/jakarta-enterprise-beans-spec-core-4.0.html#relationship-to-jakarta-managed-beans <https://jakarta.ee/specifications/enterprise-beans/4.0/jakarta-enterprise-beans-spec-core-4.0.html#relationship-to-jakarta-managed-beans>

Servlets are not managed beans, nothing in the spec says they are, and they have the JNDI binding required by the spec and no requirements to support interceptors. We also define our own lifecycle callback requirements in 15.5, we don't 'piggy back' on the managed bean spec.

AFAIK all that is required is to remove the single reference.

Make sense to me. I'll get the spec document updated.

Mark


Stuart

    Thanks,

    Mark


     >
     > On Wed, May 31, 2023 at 5:46 PM Arjan Tijms
    <arjan.tijms@xxxxxxxxxxx <mailto:arjan.tijms@xxxxxxxxxxx>
     > <mailto:arjan.tijms@xxxxxxxxxxx
    <mailto:arjan.tijms@xxxxxxxxxxx>>> wrote:
     >
     >     Hi,
     >
     >     We removed the managed beans spec from the platform. However, we
     >     still have several specs referencing it. From the top of my head,
     >     REST, Servlets and Faces still have lingering references to them.
     >
     >     Servlet is even a special case, perhaps. It supports
    (according to
     >     the managed bean spec) @Inject and @PostConstruct, but there
    are not
     >     yet plans to make Servlets CDI beans instead. REST and Faces
    do have
     >     those plans.
     >
     >     Do we (at the platform level) want to set a mandate or strong
     >     recommendation that all specs abandon usage of managed beans, and
     >     move to CDI (when running inside an EE container, as not all
    always
     >     specs do)?
     >
     >     Thoughts?
     >
     >     Kind regards,
     >     Arjan Tijms
     >     _______________________________________________
     >     servlet-dev mailing list
     > servlet-dev@xxxxxxxxxxx <mailto:servlet-dev@xxxxxxxxxxx>
    <mailto:servlet-dev@xxxxxxxxxxx <mailto:servlet-dev@xxxxxxxxxxx>>
     >     To unsubscribe from this list, visit
     > https://www.eclipse.org/mailman/listinfo/servlet-dev
    <https://www.eclipse.org/mailman/listinfo/servlet-dev>
     >     <https://www.eclipse.org/mailman/listinfo/servlet-dev
    <https://www.eclipse.org/mailman/listinfo/servlet-dev>>
     >
     >
     >
     > --
     > Thanks
     > Emily
     >
     >
     > _______________________________________________
     > servlet-dev mailing list
     > servlet-dev@xxxxxxxxxxx <mailto:servlet-dev@xxxxxxxxxxx>
     > To unsubscribe from this list, visit
    https://www.eclipse.org/mailman/listinfo/servlet-dev
    <https://www.eclipse.org/mailman/listinfo/servlet-dev>
    _______________________________________________
    servlet-dev mailing list
    servlet-dev@xxxxxxxxxxx <mailto:servlet-dev@xxxxxxxxxxx>
    To unsubscribe from this list, visit
    https://www.eclipse.org/mailman/listinfo/servlet-dev
    <https://www.eclipse.org/mailman/listinfo/servlet-dev>


_______________________________________________
servlet-dev mailing list
servlet-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/servlet-dev


Back to the top