Uploaded image for project: 'XBean'
  1. XBean
  2. XBEAN-125

getNameInNamespace() is wrong

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5
    • 3.5
    • naming
    • None

    Description

      NameInNamespace handling seems to be completely wrong. After a lot of poking around I found out from the jndi tutorial book p. 339 discussion of fully qualified names that getNameInNamespace is supposed to be the complete hierachical name in the namespace. Currently it is the name in which a subcontext is bound into its parent. Previously I've been confused about what a "namespace" is.... on p.13 its defined to be the set of all names in a naming system. This appears to mean the names starting at a root context, not at a subcontext.

      A related problem is that the nameInNamespace is stripped off a lookup in AbstractContext:

      if (stringName.startsWith(nameInNamespace))

      { stringName = stringName.substring(nameInNamespace.length()); }

      I'm not sure what should be happening here if anything but the result of the current code is that if you create subcontexts to bind
      a/b/c
      and
      a/a/b/c

      the two "b" subcontexts end up being the same object and the second bind attempt fails.

      Attachments

        Activity

          People

            djencks David Jencks
            djencks David Jencks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: