Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Using jar-built-in and outside configuration

Reply
Thread Tools

Using jar-built-in and outside configuration

 
 
wx
Guest
Posts: n/a
 
      09-16-2008
I have an application that needs some configuration stored (e.g. a
path to the default folder where all projects are stored). What is the
best way (but still relatively easy) to store this? Did anybody do the
analysis of the possible methods? I've read about some of them:
- A file (Java properties or similar - xml, ini, yaml, whatever)
- A database (though, I need the connection parameters in that case)
- Directory server (e.g. LDAP)
- Service (Web service or Java application server-like service (e.g.
JBoss service))

These are the things I'd like to achieve:
- The application should have the default values if no other value is
found (e.g. for the first start)
- It will be a jar, so the configuration cannot be (easily) changed if
it is stored in the source or files within jar. Thus, there should
have an external way to change them. For example, a properties file in
the jar folder or user's home. This is the first important thing - the
user should be able to change the configuration without too much
hassle. He should also be able to change the location of the
configuration easily. If it is e.g. a file in some write protected
folder (e.g. network share), he should be able to override this and
put it somewhere else (e.g. his home folder or something). If this
could be the default, even better.
- My second important thing is - the configuration should be easily
changeable. I don't care if I need to edit files, that is very
efficient for me, I'd say much better then going through some
preferences dialogs. I.e. speed is the key. Whatever is faster is
probably better.
- It is the advantage if the thing is portable. E.g. using files or
databases is probably very portable, while using e.g. Windows Registry
is completely unportable
- What I said above is just my look at the things. I'd like to see
other solutions - maybe I will see something different and better,
even though some of the above might not be satisfied

Do you have any experience with this? If so, what was the method you
used? What were the pros and cons of your method?

If you have any URL to some document describing various methods + pros
and cons, please post it here.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
outside type, outside function Krzysztof Poc C++ 1 02-07-2012 04:06 PM
Pix 506e w/5 static outside IPs - How to create a rule to allow ALL tcp/udp traffic from one outside IP to an internal IP (for an internal router/NAT with it's own subnet) kyoo Cisco 22 04-12-2008 03:37 PM
help with pix inside->outside + dmz->outside + inside->outside->dmz Jack Cisco 0 09-19-2007 01:57 AM
CallForward outside->inside->outside failed after one ring. Yogz Cisco 1 04-16-2007 03:58 PM
nat from outside to outside dt1649651@yahoo.com Cisco 1 08-21-2005 04:26 PM



Advertisments