Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-1335

allow atomic access to n different TypedResolver values

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.9.0
    • 1.9.0
    • Configuration
    • None

    Description

      If multiple related config values (TypedResolver) are accessed in the same request and the underlying config changes then we might up with a wild mixture of old and new values.

      An example would be to access some 'myapp.host' and 'myapp.port':
      The underlying values are 'oldserver' and '8080'.

      Now consider the following code:

       // get the current host value
      TypedResolver<String> hostCfg config.resolve("myapp.host");
      
      // and right inbetween the underlying values get 
      // changed to 'newserver' and port 8082
      
      // get the current port for the host
      TypedResolver<Integer> portCfg config.resolve("myapp.port");
      

      In ths above code we would get the combination of 'oldserver' but with the new port 8081. And this will obviously blow up because that host+port combination doesn't exist.

      Attachments

        Activity

          People

            struberg Mark Struberg
            struberg Mark Struberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: