Solved

XML Property File Configuration

Posted on 2008-06-20
5
154 Views
Last Modified: 2013-11-05
Hi,

I've currently got an java application which uses Quartz to schedule jobs. The jobs typically go to various regional databases and populate another consolidated database to get a consolidated view of the data. It also schedules routine tasks such as nightly batch activities and archiving.

The configuration data i.e job, trigger and database connection details are held in an XML config file and read by the java process.

However, today a problem occurred. A member of the team had accidental coped the production XML config file to UAT and changed some of the regional DB values to UAT values, but not the consolidated DB connection details. As a result we had erroneous UAT data in production and some details were duplicated (one from prod and one from UAT. As you can imagine this was a nightmare!

As a result I've proposed getting the DB connection details out of the xml config file and putting it in a unix vi properties file with property value pairs. This will split the job / triggers and connection details. The property file name would be propertyfile.properties.prod and propertyfile.properties.uat and the correct file read in depending on property set in the unix user .profile file.

This seems a bit complex. I was just wondering if anyone had similar problems and how the resolved it / if anyone has any advice to help create a fool-proof solution.

Your help ould be much appreciated
0
Comment
Question by:bowemc
  • 2
  • 2
5 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 21833866
Back up the config files? If you want to do it more flexibly, you could even use a versioning system for the config files, then you can keep track of edits, particularly who's allowed to make them, and roll them back if they're wrong
0
 

Author Comment

by:bowemc
ID: 21834926
Hi Cehj,

I'm looking for a way to ensure my production DB connection details are not used in a config file unless in prod, or at least reducing the likelihood of. I can't see how back-up or conversioning can help with this???
0
 
LVL 92

Expert Comment

by:objects
ID: 21835075
db connection details should be installed in a separate file, that way you have one version in production and another in testing/development

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 21835184
>>This will split the job / triggers and connection details.

That's probably a good idea, but it won't in itself prevent rogue edits such as the one you've mentioned. The best thing to do is to restrict write access and keep backups then things can be restored easily
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 21835796
> but it won't in itself prevent rogue edits such as the one you've mentioned.

of course it will. You obviously would not deploy the production file in the test environment.
And you don't need to backup it up, that won't help at all.

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
servlet  URL Rewriting 1 26
XML to Excel using XSL - formatting 3 26
ForLoop Example 3 40
Windows 10 IE Certificate Issue 10 41
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now