users@glassfish.java.net

System properties in 3.1

From: Larry Touve <ltouve_at_potomacfusion.com>
Date: Tue, 2 Nov 2010 10:47:49 -0500

In Glassfish 3.0.1, we defined some system properties through the Admin Console. These were visible in the domain.xml file as follows:

      <system-property name="foo" value="bar"/>

We could access these in our apps using:

 String foo = System.getProperty("foo");

When we upgraded to Glassfish 3.1, the behavior is different. When we define the system property using the admin console, the domain.xml file has:

      <property description="" name="foo" value="bar"></property>

System.getProperty("foo") now returns null. If I edit the domain.xml file and change <property> to <system-property> then the System.getProperty() works, but the values are not visible using the admin console.

Anybody got any ideas what's going on?

Thanks,
Larry