Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-61

[configuration] JNDIConfiguration and union configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0
    • None
    • None
    • Operating System: other
      Platform: Other

    • 26534

    Description

      JNDIConfiguration seems not to work with ConfigurationFactory when used in the
      <additional> section. The union configuration feature of ConfigurationFactory is
      implemented by calling getKeys() on a Configuration object, iterating through
      the keys, and calling getProperty() for each.
      JNDIConfiguration.getKeys() obviously always returns an empty iterator in my
      tests though the Configuration object is not empty (getString() returns values
      for some keys). I am not sure whether this is a bug in JNDIConfiguration or a
      shortcomming of the JNDI implementation used for testing.
      Another point is that JNDIConfiguration.getProperty() always throws a not
      supported error. This would also blow ConfigurationFactory if getKeys() returned
      a valid iterator. I don't understand why this error is thrown. In my opinion
      this is a violation of the contract defined by the Configuration interface (the
      same is true for some other methods).
      Attached is an extension to the unit test of ConfigurationFactory that
      demonstrates the problem.

      Attachments

        Activity

          People

            Unassigned Unassigned
            oheger Oliver Heger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: