Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-1289

allow user to provide a properties-provider on resources

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0.0-M1, 7.0.0
    • Component/s: None
    • Labels:
      None

      Description

      foo = new://Resource?....&properties-provider=foo.bar.MyProvider

      MyProvider will either implement PropertiesResourceProvider or just have a Properties provides() method.

      Note: if provider has a setProperties method then it can get injected static config properties:

          public static class PropertiesProvider {
              private Properties p;
      
              public void setProperties(final Properties p) {
                  this.p = p;
              }
      
              public Properties provides() {
                  return new Properties() {{
                      putAll(p);
                      setProperty("value", "r1"); // override
                  }};
              }
          }
      

        Attachments

          Activity

            People

            • Assignee:
              romain.manni-bucau Romain Manni-Bucau
              Reporter:
              romain.manni-bucau Romain Manni-Bucau
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: