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

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


Back to the top