Hi,

I also writing a code to read a configuration files exists in the
repository/conf folder. I am planning to use ServerConfiguration class as
follows.
Pass the configuration file, which i want to load, into init method and get
the properties list.
The serverconfiguartion class uses singleton pattern.  Also init method is
synchronized. Therefore, can be use to load multiple configuration files at
different occasions.


ex -: ServerConfiguration serverConfiguration =
ServerConfiguration.getInstance();

       serverConfiguration.init("InputStrem to  conf file");
       serverConfiguration.getProperties("prop key")


Please correct me, if i am wrong.

Thanks



On Thu, Oct 2, 2014 at 1:05 AM, Chamila De Alwis <[email protected]> wrote:

> Hi,
>
> I've been going through the ServerConfiguration class, to understand how
> it is being initiated and configurations are loaded.
>
> The init() method initializes and starts reading and loading the
> properties. And it uses "conf/carbon.xml" as the default value for the
> configuration XML file.
>
> What I don't understand is how and when ServerConfiguration classes's init
> is called, and it's mechanism to set the context to
> <CARBON_HOME>/repository/.
>
> I'm in the process of writing a component in Python which requires access
> to the server configuration properties, however I have yet to find a way to
> retrieve the path to carbon.xml.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Manoj Gunawardena
Tech Lead
WSO2, Inc.: http://wso2.com
lean.enterprise.middleware
Mobile : +94 77 2291643
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to