My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads

This project supports distributed property files for easy loading with Java projects.

This project is a solution to this problem:

In a J2EE environment, we are normally used to storing text in a property/resource file.

  • firstName=First Name
  • someOtherData=This is the data to display on screen, from property file

If you are in an environment, where it is difficult to update those property files on a regular basis, what architecture are developers using to change text/label content that would normally reside in a property file? Or let's say you need to change that content before re-deploying a property file change. One solution is to store that in a database? Are developers using memcache-db? Is that usually used for caching solutions?

Would you use a solution outside of the java framework? Like a key/value datastore? memcachedb?

Quick Start Usage

  • Add property key/value data to the H2 embedded sql database
  • Modify the conf/file/tmp/staging_load.properties file to add your key/value entries
  • Run bin/scripts/jdistprop-readall.bat to transfer from the property file in to the database
  • Run bin/jdistprop.bat to launch the jdistprop httpd web server
  • At this point, you just simply need to connect to the server to read your property files.
  • Also, double click on jdistprop.bat
  • Visit http://localhost:7191/servlet/db/default in your browser

Example Property Read Usage

 final Properties prop = new Properties() ;
 final URL url = new URL("http://localhost:7191/servlet/db/default");        
 prop.load(url.openStream());
 prop.getProperty("key");

Technology

  • H2 Database Engine
  • NanoHTTPD
Powered by Google Project Hosting