dev@glassfish.java.net

Re: virtual-server "docroot" attribute or property

From: Amy Roh <Amelia.Roh_at_Sun.COM>
Date: Thu, 17 Jul 2008 20:10:02 -0700

Lloyd Chambers wrote:
> Amy,
>
> This is through the interface
> com.sun.enterprise.config.serverbeans.VirtualServer?
>
> I think the idea was to "upgrade" such that docroot became a
> first-class attribute for a virtual server. In the Domain, it makes
> sense as an optional property, to be used as a default value.
>
> Also, are you sure that there is not both a property an an Attribute
> present? I don't see how VirtualServer could return the same value
> for getPropertyValue() and getDocRoot() unless the underlying
> implementation of PropertyBag has chosen to expose attributes via
> getPropertyValue(). Jerome might know more about this.

Closer look reveals that VirtualServer.getDocroot was returning its
default Attribute value ${com.sun.aas.instanceRoot}/docroot and is not
the same as VirtualServer.getPropertyValue("docroot") when the property
is changed from its default value in domain.xml.

So the virtual server's docroot can be specified via "docroot" attribute
and property. What should be the precedence if both attribute and
property are defined?

Thanks,
Amy

>
> Lloyd
>
>
> On Jul 17, 2008, at 3:28 PM, Amy Roh wrote:
>
>> As stated in issue[0], docs[1] defines "docroot" as an attribute of
>> virtual-server but domain.xml has it as a property -
>>
>> <virtual-server ...>
>> <property name="docroot" value="${com.sun.aas.instanceRoot}/docroot"/>
>>
>> VirtualServer.getPropertyValue("docroot") and
>> VirtualServer.getDocroot() can be currently used interchangeably in
>> v3 - returns the same value.
>>
>> Shouldn't it be either an attribute (according to the doc) or a
>> property (domain.xml)?
>>
>> Thanks,
>> Amy
>>
>> [0] https://glassfish.dev.java.net/issues/show_bug.cgi?id=4532
>> [1] http://docs.sun.com/app/docs/doc/819-3674/abhfg?l=en&a=view
>>
>> ---------------------------------------------------------------------
>> 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
>