admin@glassfish.java.net

Re: properties, system properties

From: Byron Nevins <byron.nevins_at_oracle.com>
Date: Thu, 28 Oct 2010 10:41:40 -0700

system-property's also become java system properties! I.e. every such
system-property is added via System.setProperty()

E.g. add this to the <server> element
<system-property name="XXXXXXXXXXXXXXXX" value="28687"></system-property>

Start the server and run this:

asadmin generate-jvm-report | grep -i xxxx
XXXXXXXXXXXXXXXX = 28687

====================

This technique [1] is used for automagic token resolution. System
property, env. variables are used to find values for tokens.

[1] http://blogs.sun.com/foo/entry/how_to_configure_domain_xml

On 10/28/2010 7:51 AM, Tom Mueller wrote:
> One difference between properties and system properties at the
> command line level is in the behavior of the set command:
>
> If you have a property, you can do the following:
>
> asadmin set
> configs.config.server-config.admin-service.property.adminConsoleContextRoot=/admin
>
> But if you have a system property, you have to be more verbose:
>
> asadmin set
> configs.config.default-config.system-property.JMS_PROVIDER_PORT.value=27676
>
> (Note the extra ".value" in the latter).
>
> Also, you can create a new property with the set command:
>
> asadmin set
> configs.config.server-config.admin-service.property.foo=bar
>
> and you can delete a property with the set command:
>
> asadmin set configs.config.server-config.admin-service.property.foo=
>
> But with a system property, this doesn't work. You have to use the
> create-system-properties command in order to create a new system
> property and the delete-system-properties command to delete one.
>
> Tom
>
> On 10/27/2010 6:43 PM, Lidia Marchioni wrote:
>> Hello all
>>
>> I have a general question regarding various properties that can be
>> set in Glassfish. I'm testing Admin Console and see the following
>> pages for properties:
>>
>> * server
>> -> System Properties tab
>> * a cluster
>> -> Properties tab containing:
>> -> System Properties (also called Cluster System Properties)
>> and Cluster Properties tabs
>> * a clustered instance
>> -> Properties tab containing:
>> -> Configuration Properties (also named Configuration System
>> Properties) and Instance Properties
>> * a standalone instance
>> -> Properties tab containing:
>> -> Configuration Properties (also named Configuration System
>> Properties) and Instance Properties
>> * a cluster-config
>> -> System Properties page (also called Configuration System Properties)
>> * other configs as the one above...
>>
>> The above pages are somewhat confusing in Admin Console (partially
>> due to naming, e.g. Configuration System Properties, I'll log an
>> issue for that). It is hard to tell if there is any relationship
>> between them, just looking at the GUI pages, and what that
>> relationship may be. I would like to understand the relationships
>> before logging any enhancement requests.
>>
>> It looks like there are two types of properties: just "regular,
>> simple" properties and system properties. Looking at v2
>> documentation
>> (http://docs.sun.com/app/docs/doc/820-4338/abhey?l=en&n=1&a=view) it
>> seems that system properties differ from regular properties in that
>> they are hierarchical and thus can be overridden further down the
>> chain. Is there any other significant difference between the two?
>> Is there any other relation between various properties?
>>
>> Thanks
>> Lidia
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> 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  -  Oracle Corporation
Home: 650-359-1290
Cell: 650-784-4123
Sierra: 209-295-2188