users@glassfish.java.net

Re: Reading System

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Fri, 18 Mar 2011 10:13:37 -0700

Nothing in EJB container code prohibits you to do that. May be the
properties are not propagated correctly to the clustered instances?

-marina

Tom Mueller wrote:
> Maybe there is a difference here between EJBs and other web content.
> Hopefully someone from the EJB team can chime in.
>
> I tried a simple web application with the following JSP content:
>
> <h2>Environment</h2>
> <% for (String n : System.getProperties().stringPropertyNames()) {
> out.append(n).append("=").append(System.getProperty(n));
> out.append("<br>");
> out.newLine();
> }
> %>
>
> I ran:
>
> asadmin create-system-properties --target server foo=bar
>
> and then accessed the application, and the value of the property was
> printed by the JSP.
>
> Tom