Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

Blueprints/Patterns for managing configuration in large app?

Thread view: 
nospawn - 09 Mar 2006 11:29 GMT
Hi all,

The scenario is you have a large set of application configuration
settings comming from: ldap, property files etc.

The problem is many sections of your application depend on many
different configuration settings. I am bored of seeing a big fat and
evil global class having the indecent exposure smell that is used from
every point of the application and the "reading configuration
parameters" concern scattered all over.

Any ideas or approaches to address this very problem?

Given that configuration management is more close to a "non-funtional
concern" would it make sense using AspectJ and take the concern out of
the first OO dimension? examples? also would it bring in this case
another problem that configuration management needs another
"non-funtional concern" logging ...

Thanks in advance,
Best Regards,
Giovanni
Rastislav Komara - 09 Mar 2006 15:28 GMT
Hello,
  There are several ways. One of them is use special Class for
Configuration. Its implementation will be responsible for reading and
possibly writing configuration values dependent on key. This
Configuration will use SPI approach to provide variable implementations
of ConfigurationDataSources. This Configuration can be singleton
initialy configured e.g. from xml file where is stored information
about list of providers, strategy for using these providers,
availability of cache etc... The configuration will use special Key
object to identify the value. This key can also identify a primary
resource or hold key tipe information to help make strategic decisions
about source of value.

If U want to use already created solution try
java.util.prefs.Preferences


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.