Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
28. Aug 2008, 23:36 CET | Link

I have a need to have different properties base on the server. i.e QA, preproduction, production A or production B, I can load a local properties file into jboss with this code in the properties-service.xml

<mbean code="org.jboss.varia.property.SystemPropertiesService" 
	 name="jboss:type=Service,name=SystemProperties">
    <attribute name="URLList">
      ./conf/local.properties
    </attribute>
  </mbean>

I can see them in the JMX view for the SystemPropertiesService. But how can I read them in my application?

any suggestions. Thanks in advance. Matthew Demerath

1 Reply:
28. Aug 2008, 23:46 CET | Link

I had been trying:

String myProp = System.getenv("myProp");

but it wouldn't work.

My co-worker Aman just suggested:

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

and it works great! Thanks Aman.