Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Loading Configurable Parameters in a J2EE App

 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Web Application calling 3rd party Web Services. This application needs a number of configurable parameters.

For eg: Java.util.logging parameters, Web Services URLs and other parameters. Which is the best place to store them as configurable parameters?

1. I can store them in my Web.xml and retrieve them in the Servlet, but I might have to redeploy my application everytime, one of the parameters changes.

2. I can store them in a properties file, say, ABC.properties, using a static class or a Singleton to a access the properties. But is it OK to read configurable properties in this way from a J2EE application?

3. Use a ResourceBundle?

Which is the preferred way of loading configurable parameters in a J2EE Application?
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It all depends on the requirements for your application. If you truly need your application to be running all the time and can't spare a few minutes for a redeploy, then most of those solutions wouldn't be viable. Possibly a database if you're looking for 24x7 availability. How often are these values changing? What are your availability requirements? Etc ...
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!