[MAGNOLIA-3516] Allow PropertyInitializer to also use system and environment properties. Created: 19/Jan/11 Updated: 13/Mar/12 Resolved: 09/Mar/12 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 4.3.8, 4.4.1 |
| Fix Version/s: | 4.5 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Danilo Ghirardelli | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Patch included: |
Yes
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||
| Date of First Response: | |||||||||||||||||
| Description |
|
Another strange system architecture required another patch to the property initializer. This time the problem is that all the instances in the cluster must be exactly the same, without the possibility to use a context param just like I did in the other patch. So this time I propose to add also the possibility to use system properties to get the configuration files correctly. I know that the entire property initializer should be refactored, even if the patch is not accepted I'd just like to write another real life scenario that should be included in the refactoring... |
| Comments |
| Comment by Magnolia International [ 19/Jan/11 ] |
|
Hey Danilo, Thanks for the patch. I'll try to apply it - I'm currently refactoring a lot of the startup stuff (in the magnolia-ioc branch), but I think this part hasn't been touched yet, so i should be able to merge. Cheers ! |
| Comment by Magnolia International [ 19/Jan/11 ] |
|
And while we're at it, here's an additional patch that should allow using environment properties ! |
| Comment by Magnolia International [ 19/Jan/11 ] |
|
And here's a basic test patch for both features (which will fail on windows ...) |
| Comment by Danilo Ghirardelli [ 20/Jan/11 ] |
|
Thank you. I thought this issue would stay there for a longer time |
| Comment by Magnolia International [ 26/Jan/11 ] |
|
Thanks Danilo; indeed PropertyInitializer is being deprecated (just about to commit as I write this). Left a comment on |
| Comment by Danilo Ghirardelli [ 26/Jan/11 ] |
|
No, unfortunately... At most is a comment in |
| Comment by Magnolia International [ 09/Mar/12 ] |
|
This is now possible - DefaultMagnoliaPropertiesResolver takes care of it. One can use paths such as WEB-INF/${systemProperty/testProp}/magnolia.properties or WEB-INF/${env/FOO}/magnolia.properties in their magnolia.initialization.file value. |