On 3/21/2012 11:12 AM, Laird Nelson wrote:
> On Wed, Mar 21, 2012 at 9:16 AM, Tom Mueller <tom.mueller_at_oracle.com
> <mailto:tom.mueller_at_oracle.com>> wrote:
>
> These can be any system property value, including those passed
> with -D on the java command line (use create-jvm-options to set)
> and system properties (use create-system-properties to set).
>
>
> Great; thanks. FWIW I noticed that the Administration Guide doesn't
> make mention of this really excellent facility (or at least searches
> for "system property" and "system properties" in my PDF reader turned
> up how to set them, but not that they get expanded when in
> ${dollarBracket} form).
>
> Does this also mean that I could use them in deployment descriptor
> files (perhaps non-portably)? Or only domain.xml configurations (and
> templates)?
Only domain.xml.
Cheers,
Tom
>
> For example, if I put this in a persistence.xml somewhere:
>
> <jta-data-source>${myApplicationDataSource}</jta-data-source>
>
> ...would it expand (if the property is set, of course)? (If the
> property were not set, would it expand to the empty string, or to the
> literal string "${myApplicationDataSource}"?)
>
> I recognize this is probably a crazy thing to do and am not entirely
> serious here; just trying to grok all the possibilities. (It has
> always bothered me that whereas all the other deployment descriptors
> offer up a level of indirection for resource references, I have to
> specifically mention a global JNDI lookup (which could of course be
> java:app/env-scoped) for a data source.)
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>