We have been discussing a solution for that exact problem (although the solution would offer a number of other benefits, as well) in the form of what could be called a "configuration service". In a nutshell, it would allow a separate "deployment unit" to specify configuration information that could apply to one or more applications (the applications to which the configuration may be currently deployed or deployed at some point in the future). This would provide an architecture for decoupling the configuration from the application archive, as well as provide a potential framework for more sophisticated applications to respond to dynamic configuration, if such a thing was required in the future.
In your case, if the container supported such a configuration service, you would be able to submit the configuration to the server and then deploy the application, having the configured environment injected into it if desired. Is this close to what you were picturing as well, or did you have something else in mind?
On 10/05/2012 12:18 PM, Laird Nelson wrote:
[javaee-spec users] Re: [jsr342-experts] DD Property Substitution