dev@glassfish.java.net

Re: default value of auto deploy and dynamic reload in v3 prelude has changed to "false"

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Mon, 13 Oct 2008 14:57:29 -0700

Hi Anissa, et. al.

I agree. This is confusing. There are few other such occurrences where
the DTD used to say things differently from the default templates. There
were reasons to do that as well at the time. And one of the reasons is
compatibility.

For example, it makes no sense to have autodeployment disabled by default,
for developer use of GlassFish v2, v3.
But at the time DTD was created, we did not take into account this fact
or there were compatibility requirements at that time. To work around this
problem, default templates resorted to setting this attribute to "true"
by default.

Till V2, it is reasonable to accept that default value is the value
declared in the DTD.

 From v3 onwards, @Configured interface annotations for defaultValue
define the default values. They are expected to be compatible with their
DTD equivalents. Default templates also, are expected to remain compatible
with their earlier counterparts, so this confusion is going to remain, unless
we document it clearly.

In this particular case, since both attributes are set to true, we can
say that they are set to true in default template. Since there is no interface
to create an instance of das-config, I'd suggest we document it as follows:

- The values of these attributes are initialized to "true". (This covers
   vanilla installations) since they represent the typical use by users.

- If you modify the domain.xml to *remove* these attributes from domain.xml
   (by hand), then they (both) will be set to false. So, those are their
   default values in this sense of the "default values".

- There is no way to remove these attributes from domain.xml using admin
   interfaces. They will have to be set to either "true" or "false" as they
   are boolean in nature.

-Kedar

Lloyd Chambers wrote:
> Tim,
>
> If we always generate values of "true", shouldn't we make the defaults
> also be true? It seems very confusing otherwise.
>
> Lloyd
>
> On Oct 13, 2008, at 2:05 PM, Tim Quinn wrote:
>
>> Hi, Anissa.
>>
>> The v2 DTD certainly says the defaults for these values is "false."
>> But the domain.xml that is generated when a domain is created has both
>> of the values set to "true" for both v2 and v3 prelude. So I guess it
>> depends on what the meaning of "default" is.
>> The v2 DTD default and, in v3, the corresponding default settings on
>> the config-api DasConfig interface are "false" but the effective
>> default values are "true."
>> - Tim
>>
>> Anissa Lam wrote:
>>>
>>> As i am reviewing the Deployment Guide and testing if the default
>>> value it mentioned is correct, I notice that in v3 prelude, the
>>> default value for <autodeploy-enabled> and
>>> <dynamic-reload-enabled> is "false" by default.
>>> If i set that to 'true', then i can see that it is written out to
>>> domain.xml as
>>>
>>> <das-config autodeploy-enabled="true" dynamic-reload-enabled="true"
>>> deploy-xml-validation="full"
>>> autodeploy-dir="${com.sun.aas.instanceRoot}/autodeploy" />
>>>
>>> Is this a known issue or we have changed the default value in v3 ?
>>> It used to be 'true' for v2, and thats what the deployment guide
>>> said also.
>>>
>>> thanks
>>> Anissa.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>