Axis2 webservice (aar archive) properties file
Posted
by XpiritO
on Stack Overflow
See other posts from Stack Overflow
or by XpiritO
Published on 2010-03-22T20:54:28Z
Indexed on
2010/03/30
8:43 UTC
Read the original article
Hit count: 576
Hi there, guys.
I'm currently developing a set of SOAP webservices over Axis2, deployed over a clustered WebLogic 10.3.2 environment.
My webservices use some user settings that I want to be editable without the need for recompiling and regenerating the AAR archive. With this in mind, I chose to put them into a properties
file that is loaded and consumed in runtime.
Unfortunately, I'm having some questions about this:
As far as I know, to achieve what I want, the only option is to put the properties file into the ../axis2/WEB-INF/classes
directory of each one of the deployments (on each WebLogic instance) I currently have on my clustered configuration, and then load the file, as follows (or equivalent, this has not been verified for optimization):
InputStreamReader fMainProp = new InputStreamReader(this.getClass().getResourceAsStream("myfile.properties"));
Properties mainProp = new Properties();
mainProp.load(fMainProp);
This is not as practical as I wanted it to be, because each time I want to alter some setting on the properties file, I have to edit each one of the files (deployed over different WebLogic instances) and there is a high probability of modifying one of these files without modifying the others.
What I would like to know is if there is any (better) alternative to accomplish what I want, minimizing the potential conflict of configuration that is created by distributing and replicating the properties file through multiple WebLogic instances.
© Stack Overflow or respective owner