aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Best practices for accessing application configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Best practices for accessing application configuration" Watch "Best practices for accessing application configuration" New topic
Author

Best practices for accessing application configuration

max oschen
Greenhorn

Joined: Jul 07, 2011
Posts: 1
What are the current best practices for loading and accessing configuration values on application level. My understanding is that Singletons should not be used. I have read something about thread local, but I was wondering what else is in use and has proven to work well. Spring comes to mind as well, but as the application I am working on is rather small I would prefer not to add too many libraries.

What I mean with application level configuration is stuff like database drivers, colors, input/output paths for files, etc. So basically configuration values that you would like to access from all over the application and that you do not want to pass around from class to class.

Cheers,
M
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

I believe, using Singleton sensibly is normally recommended. Singletons allow you to refer/access to resources that need to be shared across an application.


S.D. MADHAN
Not many get the right opportunity !
 
 
subject: Best practices for accessing application configuration
 
Similar Threads
properties file
Finally SCEA with 91 %
Is it a good practice to save files in local system via signed applet
Can I access the Application Context from a Struts 2 Action?
Agile Testing: New to Agile Methodologies