Hi
I realized we have a potential conflict between JSF and 299 to do with
EE defined managed beans, which we need to address. Imagine the
following scenario: A managed bean is defined using @ManagedBean in a
war in which both JSF and Web Beans is enabled. In this case both JSF
and Web Beans will attempt to manage the bean, however according to
the latest note sent by Roberto Chinnici to the EE expert group, if
299 is present, 299 should manage the bean. We need to address how to
deal with this for both Web Beans and Mojarra.
Some points to consider:
* 90% of the time there is no problem, the Web Beans ELResolver is
installed before the JSF ManagedBeanELResolver. However the corner
case of an eager instantiated, application scoped managed bean with a
post construct lifecycle callback will cause us a problem. There may
also be other corner cases we haven't considered. For this reason, I
think we should consider being able to explicitly disable JSF managed
beans
* this doesn't affect other specs which may use managed beans as much,
(a) as Mojarra works in other containers than GlassFish, such as
Tomcat, where Web Beans may not be present
(b) 299 specifically states that JSF should use an ELResolver as
it's integration point (other specs integration point is programatic
and so can use an SPI if or similar - Ken's suggestion from our latest
meeting for those who were there)
* Mojarra will need to continue to provide xml-defined managed beans
when Web Beans/299 is present.
My suggested solution is to simply have a switch in Mojarra we can use
to "turn off" annotation-defined managed beans support (either
automatic via detection of WEB-INF/beans.xml or manual via web.xml or
programatically).
Pete
On 31 Jul 2009, at 20:11, Barbara Louis wrote:
- How we deal with jsf managed beans when 299 is present?
- 299 requires managed beans
- JSF RI will need to make the change - the ques to ask is: should
jsf manage the managed beans or should I let the EE container to
manage it for me?
- Pete will send an email on webbeans dev mailing list on this topic
and include Mojarra mailing list (webtier(a)glassfish.dev.java.net)