Solved

XML Property File Configuration

Posted on 2008-06-20
5
157 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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Desingning Refactoring existing code 2 26
How  can  i  resolve  HTTP Status 404 -? 8 43
Notify sent to other threads in Java 9 33
Bot application - advice 3 38
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

860 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