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

Suspicious Logic when setting BeanManager from JNDI

    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

        1. beanmanager-init-from-jndi.patch
          0.5 kB
          James McLeod

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: