Skip to main content

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

+1 Scott.
I think the work remaining to be done is:
1. Remove the annotation ManagedBean
2. Remove all references to Managed Beans specification in other Jakarta EE specs
3. All other specs that need to use managed beans should update to say CDI Beans instead and use @Inject for injection.
Thanks
Emily

On Tue, Jun 6, 2023 at 3:20 PM Scott Stark <starksm64@xxxxxxxxx> wrote:
Since the ManagedBean spec only said one may use these
PostConstruct/PreDestroy annotations:

"Managed Beans may use the jakarta.annotation.PostConstruct and
jakarta.annotation.PreDestroy annotations to identify methods to be
called back by the container at the appropriate points in the bean’s
lifecycle."

The fact that the Serlvet spec dictates this is a required behavior
would simply indicate that it has adopted the common annotations in
that manner. It really has nothing to do with ManagedBeans in my view.
It is now also completely subsumed by the CDI reference to the
specification, so simply removing the reference to the Jakarta Managed
Beans specification is all the Serlvet spec needs to do.


On Tue, Jun 6, 2023 at 4:51 AM Arjan Tijms <arjan.tijms@xxxxxxxxxxx> wrote:
>
> Hi,
>
> On Tue, 6 Jun 2023 at 09:35, Mark Thomas <markt@xxxxxxxxxx> wrote:
>>
>> > In EE 11, we should completely remove Managed Beans Spec from Jakarta EE
>> > 11 Platform spec and remove all of the references.
>>
>> 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)?
>
>
> I think, as we have discussed in the past to some degree, that we must make a stronger distinction in the Servlet spec for Servlet running outside the Jakarta EE platform (such as Tomcat and Jetty) and inside the Jakarta EE platform (such as GlassFish, WildFly, OpenLiberty).
>
> Within the Jakarta EE platform Servlets should (probably) become CDI beans (WildFly already does this, setting a precedent). This means @Inject (specifically) is handled by CDI.
>
> Outside the Jakarta EE platform, Servlet containers are free to support @Inject and @Postconstruct as they wish. Maybe delegate the task to CDI if it's available.
>
> Thoughts?
>
> Kind regards,
> Arjan Tijms
> _______________________________________________
> jakartaee-platform-dev mailing list
> jakartaee-platform-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev
_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev


--
Thanks
Emily


Back to the top