I have a config file (lets call this file main-config.xml) with a list of environments of databases for my app.
The question now, I have several frameworks that requires the information from inside main-config.xml, but different format (hibernate wants its own config format and mybatis wants its own format). so how can I populate the hibernate's and mybatis' config file based on the value in main-config.xml. thanks
umm, I've been working with XML for quite a while along with XSLT. I don't understand how the article can help me with thisissue, am I missing something? thanks
1) Keep all those properties in some file format of your own choosing, and create all the config files for the various subsystems as part of the build process from that.
2) Write code that reads the properties at startup time, and then initialize the other libraries programmatically.
@william brogden:
yep, this is what I've been looking for.
K. Tsang:
yes, properties file would also work, its just my team prefer XML because utility class that processes XML already exist. its just a matter of habit I guess. can you give me an example of how this works?
is xi:include the common way in reusing information stored in one main configuration file by different frameworks config file?
Trust God, but always tether your camel... to this tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop