You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2014/08/06 19:22:12 UTC
[jira] [Created] (TOMEE-1289) allow user to provide a
properties-provider on resources
Romain Manni-Bucau created TOMEE-1289:
-----------------------------------------
Summary: allow user to provide a properties-provider on resources
Key: TOMEE-1289
URL: https://issues.apache.org/jira/browse/TOMEE-1289
Project: TomEE
Issue Type: New Feature
Reporter: Romain Manni-Bucau
Assignee: Romain Manni-Bucau
Fix For: 2.0.0
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:
{code}
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
}};
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)