dev@glassfish.java.net

Re: [GFv3] System properties set in domain.xml not available to bootstrap code

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Thu, 19 Mar 2009 12:53:56 -0700

Sahoo wrote:
> Kedar Mhaswade wrote:
>>
>>
>> Sahoo wrote:
>>> Yes, there are other configurations as well. e.g., list of bundles to
>>> be started automatically, port number for Felix remote shell, etc. I
>>> am also not sure if JDK logging.properties file can be used to
>>> control felix's log level. Richard, can you clarify?
>>>
>>> No, I can't use @Configured, because this code runs outside of HK2 or
>>> OSGi environment. It runs as part of ASMain before launching the OSGi
>>> framework.
>> Hmm. It is best to leave such configuration out of domain.xml then.
>> Anything that goes to domain.xml should have a backing @Configured
>> (e.g. http-service -> com.sun.enterprise.config.serverbeans.HttpService)
>> in some module. Remember, administration depends on these interfaces
>> in order to expose it uniformly via admin interfaces.
> I don't understand this limitation. I already mentioned, these are
> system properties. Currently they are set via a separate config file
> called felix/conf/config.properties. I want them to be moved to
> java-config/system-proprties in domain.xml. What's wrong with it?

Huh?
There is nothing wrong with java system properties. You can just put
them there as many as you want. I thought you had things like "ports"
which you wanted to make just attributes of elements that you are
introducing.

If everything is just a Java System Property, go ahead, just put them
there.

When launcher (asadmin start-domain) starts the server, it will parse
these properties (java system properties, i.e.) and send them to you
*on the java command invocation*. Thus, if inside ASMain or wherever,
you did System.getProperty, you'll get them.

Please consider sending the changes to domain.xml for a review.

-Kedar

>
> Thanks,
> Sahoo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>