Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

JVM Languages

Solving the Configuration Problem for Java Apps



Related Reading


More Insights




noro

[Disclaimer] I'm the author of the cfg4j library.

You could also consider using one of the open source libraries for configuration management. Give CFG4J (http://cfg4j.org) a try. It's a configuration library for Java distributed apps - it offers type-safety and ease of use. It also supports many backends (e.g. Consul, Git repos) and has some distributed environment-friendly features like fallback strategies, re-tries and caching.

bowrocker

Very well-done article, on a topic that has been mostly ignored by the Java community. I find this surprising given that configuration is a big weakness of the Java system.

I would be interested to know Holub's thoughts on configuration with reference to popular "configuration" frameworks such as spring, which allow classes to be configured and wired together by XML, but which is then tucked away in jar or war files making field changes impossible.

We have found some solutions, but could the implementation here be used in conjunction with such a framework?

D0UG4L

Great article.
One question: what about multi-threading? Directories can be created, as in the case of the TMP directory, which might be problematic if two threads cause the support class to be initialized twice?