admin@glassfish.java.net

Re: resolving domain.xml config values eg ${com.sun.aas.installRoot}, etc

From: Byron Nevins <Byron.Nevins_at_Sun.COM>
Date: Fri, 18 Apr 2008 20:06:48 -0700

Every config item automatically goes through the Translation class. So,
e.g., all the injections are substituted.
Using System Properties exclusively is unfortunate. But we can rectify
that now that the D&P show is done...


Lloyd L Chambers wrote:
> Byron,
>
> Thanks. To my knowledge, there is no documentation as to how this is
> specified to work. We should settle on something and make sure it's
> implemented that way (eg we need an asarch meeting, etc).
>
> In my view, the substitution should be more widely available, or made
> very explicit.
>
> Lloyd
>
> On Apr 18, 2008, at 3:15 PM, Byron Nevins wrote:
>>
>>
>>
>>
>>
>> Lloyd L Chambers wrote:
>>> I'm hoping someone has extant knowledge about how our
>>> variable-subsitution works.
>>>
>>> If a domain.xml attribute has a value like
>>> ${com.sun.aas.installRoot} or ${foo.bar}, what is the algorithm for
>>> resolving that to an actual value? (And where is the code that does
>>> it?)
>> org.glassfish.config.support.TranslatedConfigView
>>> My assumption is that the algorithm looks for values in this order,
>>> but I might be mistakeN:
>>>
>>> 1. System.getProperty( "com.sun.aas.installRoot" )
>>>
>>> 2. a <system-property name="com.sun.aas.installRoot " value=...">
>>> in an enclosing scope (eg <config> or <server> or <domain>.
>>>
>> com.sun.enterprise.v3.server.SystemTasks
>>> Right? Wrong? Something else also?
>> Right. Wrong. SystemTasks looks in <server> and <config>. It does
>> not look in <domain>. Should it?
>>
>> It does it in a non-ideal way -- it sets the <system-property>'s in
>> d.x to System Properties
>>
>>
>>>
>>> ---
>>> Lloyd L Chambers
>>> lloyd.chambers_at_sun.com
>>> Sun Microsystems, Inc
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>>
>>
>> --
>> Byron Nevins Work 408-276-4089, Home 650-359-1290, Cell 650-784-4123
>> - Sun Microsystems, Inc.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>
>
> ---
> Lloyd L Chambers
> lloyd.chambers_at_sun.com
> Sun Microsystems, Inc
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>

-- 
Byron Nevins Work 408-276-4089, Home 650-359-1290, Cell 650-784-4123 - Sun Microsystems, Inc.