What are Java properties?
Java properties is the most famous way of defining Java application resources such as database connections, specific application “variables”, etc. This is very useful but, since this mechanism is static, it may become a programmer’s nightmare when it comes to adapt an application to several testbed or production environments, cause every time you make a change you have to restart your application in order to load those same changes.
Many smart coders find themselves implementing their own properties machine to enable their application to reload the properties file without having to restart the entire application. Unfortunately the complexity of this solution grows side-by-side with the application’s size.
Real world example:
We [me and the team I’m part of] are developing a JEE application which is now in the “bring-up” phase, which consists in deploying several JBoss instances in different machines and distinct Hibernate configuration for each one of the database engines. This is hard to maintain with current java.lang.Properties methodology but not with Dynamic Java properties!
So, what is Dynamic Java properties?
As the name itself explains, dynamic Java properties is nothing more than a concept that provides you a flexible way of configuring your application resources and/or behaviour in a simple way and during application runtime.
If it’s just a concept, why should I care?
Well I just wanted you to understand easily and rapidly what I’m going to present to you now: Hierarchical Inherited Rule-Interpreted XML (aka HIRIX).
“Hierarchical Inherited Rule-Interpreted XML is much like an XML parser in that it takes any XML source and parses the XML to create a document object model (DOM), which can then be accessed via an API. However, the capabilities of Hierarchical Inherited Rule-Interpreted XML extend far beyond the realm of simply parsing XML. This technology is capable of modifying the XML structure as the DOM is created as well as dynamically interpreting values from the DOM as it is accessed via the API during run-time execution. Therefore, expressions can now be embedded within the elements and attributes of a XML document, and, when the element or attribute value is retrieved via the API, it is interpreted by execution of the expression.” [source: alphaworks.ibm.com]
A basic introduction to HIRIX can be found here [developerworks @ ibm.com].
Btw, does anyone know something like this for C#? Tks in advance!