Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4633

Suspicious Logic when setting BeanManager from JNDI

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.1
    • 4.0.2, 4.1.0-RC1
    • None
    • None

    Description

      Function private BeanManager lookupBeanManagerFromJndi() in FacesInitializerImpl (specifically line 594 of the current version looks incorrect to me.

      The logic in the function is:

      1. Try to retrieve beanManager as java:comp/BeanManager in InitialContext
      2. If this succeeds (i.e. beanManager is non-null), try to retrieve beanManager as java:comp/env/BeanManager in InitialContext

      The second step should be done if the first attempt to retrieve beanManager fails, not if it succeeds. (If my interpretation is wrong, I think an explanatory comment is warranted here!)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            jmcleodfoss James McLeod
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment