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

Add getters for the initial parameters of DatabaseConfiguration

    XMLWordPrintableJSON

    Details

    • Type: Wish
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:

      Description

      We use database configuration to support a centralized location for configuration properties common to some distributed components of our application, and it works great. In order for our application components to report issues (especially when we have database connection issues), we extended database configuration to maintain a backup cache for all properties and update the cache whenever a property is accessed. This way, the cached properties can be used if the properties cannot be loaded from the database. The extension works as expected and can report issues even if the database connection becomes not available.

      The only (minor) thing is that, when we extended DatabaseConfiguration, we had to maintain another copy of the initial parameters such as table name, name/key/value columns, etc, because DatabaseConfiguration does not provide access to them. I was wondering whether or not the following can be added to DatabaseConfiguration to make it easier to be extended.

      • Add getters for initialization parameters, and
      • Change private void close(Connection, Statement) to protected for reuse.

      Please ignore if you don't think the suggested changes can be useful to users.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              yzstone Yanlin Ye
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: