4 Replies Latest reply on Apr 20, 2007 12:33 AM by v ck

    Accessing properties from jboss

    v ck Newbie

      Hi,
      Am using jboss AS, and,

      I would like to give some configuration values(typically key-value). I have a scenario to access certain key values from a config file,

      I can do it through Properties class and FileInputStream, but i don want to hardcode path to the config file,
      I also can do it through ClassLoader.getResourceAsStream ("resource.properties");

      But what I am wondering here is if I can configure props using something like jboss.properties,etc, so that props are loaded when jboss starts up, and I can access those props through System.getProperty()

      I do not want to access the property from a servlet or from an MBean,

      My scenario is to get some config values from a property file and use it in a few helper classes that I have written to carry out some general functions, for ex, I want to access a timeout value from the property file in the helper class!
      how do I achieve this, or what is the right way of doing this


      Appreciate your help!

      Thanks