[jboss-jira] [JBoss JIRA] Commented: (JBCACHE-1218) System property substitution in config file parsing

Elias Ross (JIRA) jira-events at lists.jboss.org
Tue Mar 18 13:17:51 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBCACHE-1218?page=comments#action_12403446 ] 
            
Elias Ross commented on JBCACHE-1218:
-------------------------------------

One use case for this would be for cache loader configurations, the Amazon S3 one I wrote for example, to obtain login credentials from the system environment rather than storing credentials in the .xml configuration many people use.

Since this is fairly trivial (a few lines of Java) could we have it in 2.2?

> System property substitution in config file parsing
> ---------------------------------------------------
>
>                 Key: JBCACHE-1218
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-1218
>             Project: JBoss Cache
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>            Reporter: Brian Stansberry
>         Assigned To: Manik Surtani
>
> Since JBC parses its own config files it would be nice to support the ${some.system.property:somedefault} syntax.  This should be trivial to do; just add callouts to org.jboss.util.StringPropertyReplacer.replaceProperties(String) in XmlHelper.getAttributeValue() and XmlHelper.getElementContent().
> This could even be helpful in JBoss AS if XmlParsingConfigurationRegistry is used -- the normal AS parsing wouldn't be used in that case.  But, it would be simple enough though for me to write a different ConfigurationRegistry that had its config injected from MC beans rather than parsing the XML itself.
> Manik, I left this assigned to you to give you a shot at making any inputs.  If you think its worthwhile, feel free to assign back to me.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list