Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-tck-dev] [faces-dev] Should Platform TCK tests that include Managed Beans be removed from the EE 10 Platform or updated to include an empty beans.xml?

Hi,

On Thu, Apr 28, 2022 at 9:58 PM Scott Marlow <smarlow@xxxxxxxxxx> wrote:

I think that javax.faces.bean.ManagedBean became jakarta.faces.bean.ManagedBean and jakarta.faces.bean.ManagedBean was removed from the Jakarta Faces 4.0 spec and the Platform TCK tests that use jakarta.annotation.ManagedBean just needs updating to include the empty beans.xml. 


Kinda. 

Things are a little bit different than described above.

I'll try to explain it a little more with some history.

JSF (2003) introduced a concept called the managed bean, which was purely an XML based construct. Only with 2.0 (in 2009) did it introduce an annotation for this;  jakarta.faces.bean.ManagedBean.

At the same time CDI was introduced as well, and to make the chaos complete JAX-RS for some reason had the need to introduce its own managed bean / injection.

That is where jakarta.annotation.ManagedBean came in, which attempted to create a kind of minimal meta bean model; specifying a minimum set of services with respect to injection (@Inject) and life-cycle (@PostContruct etc). The jakarta.annotation.ManagedBean annotation is barely if ever used in practice.

Now the empty beans.xml has nothing to do with the jakarta.annotation.ManagedBean annotation, as beans.xml is specified by the CDI specification, and not by the Managed Bean specification.

Likewise, jakarta.faces.bean.ManagedBean has not much to do with jakarta.annotation.ManagedBean either. It's just that one of the spiritual / conceptual clients has been removed, but it doesn't affect the Managed Bean spec itself. jakarta.faces.bean.ManagedBean is only specified in the Faces (JSF) spec.

Hope this somewhat helps.

Kind regards,
Arjan Tijms




 

Back to the top