[
https://issues.apache.org/jira/browse/OWB-402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884096#action_12884096
]
Joe Bergmark commented on OWB-402:
----------------------------------
I'm not sure I agree that this is the right behavior right now. Basically what
can happen is this:
A Pojo contains an @ManagedBean annotation of the javax.faces.bean.ManagedBean
variety (for example), but no @Named. Lets say that Bean is "MyBean.java"
MyBean.java lives in an archive with a beans.xml (hence CDI is enabled)
Some JSF component references that bean via the EL : <h:outputText
value="#{myBean.blah}"/>
Because MyBean isn't @Named, we won't know anything about its EL name so the
JSF el-resolver will end up handling this. As documented in the EE6 spec, JSF
bean are supposed to support @Inject (see table EE.5-1) so a full JEE
container would need to lean on CDI (OWB in this case) to handle that injection
point. Unfortunately with the current behavior in OpenWebBeansJsfPlugin it
won't be able to do so.
I agree there are some weird edge cases here if that @ManagedBean also has an
@Named annotation, but I think the above example is more likely.
> OpenWebBeansJsfPlugin does not recognize @ManagedBean
> -----------------------------------------------------
>
> Key: OWB-402
> URL: https://issues.apache.org/jira/browse/OWB-402
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Java EE Integration
> Affects Versions: M4
> Reporter: Joe Bergmark
> Assignee: Joe Bergmark
> Priority: Minor
> Fix For: 1.0.0-CR2
>
>
> OpenWebBeansJsfPlugin does not recognize @ManagedBean as a managed bean.
> Right now it only throws and Exception when it is passed a UIComponent (a JSF
> component).
> In the longer term, it seems like it should both
> 1) Look for the @ManagedBean annotation on the class
> 2) Look for other beans defined in the faces-config.xml (possibly harder)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.