Forums Register Login

App Config files

+Pie Number of slices to send: Send
Hi All,

I have to requirement like where in I need to read the configuration files. probably configuration files are XML and again I am free to choose the type of the configuration file.

Can I use the JPA to read the application configurations ? I don't want to use the DB to save the configurations How can I achieve this ?

Please suggest.
+Pie Number of slices to send: Send
If you want to read XML files and convert them to objects, I would recommend JAXB. It is the standard for object-xml mapping.

EclipseLink Moxy supports JAXB and object-xml mapping.
+Pie Number of slices to send: Send
Is this a Spring framework application?

If so, you could extend PropertyPlaceHolderConfiguration and implement InitializingBean.

This will allow you to "inject" properties from either .properties files, xml, or DB.

We use this to maintain one single code-base packaged as a war and started pointing to one of many config files.

Pat.
+Pie Number of slices to send: Send
Thanks for your reply, currently I am not using the Spring Frame work
I like you because you always keep good, crunchy cereal in your pantry. This tiny ad agrees:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 850 times.
Similar Threads
creating configuration programmatically in JAAS
Multiple persistence units with different column mappings
How to implement XML in Web App
Can we use additional properties files?
4.2.3 issues with Mac OS X (JDK 1.6)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 13:16:16.