My code boots up & gets its hostname from the hostname it reads in a
configuration resource, this file can either be a full config
Can you elaborate on this? Thanks.
none of the code to do this is in Axis. It is how my webapps work; my webapps may include axis, but they include many other things. Having an axis-independent config arch lets me reuse configurable components in many different cases.
In my project a full configuration is an XML File that lists things like
-database classname, login info
-path to network filestore
-fully qualified hostname of the front end machine (for use in load balancing situations)
In a cluster of identically configured boxes, you dont want to duplicate the file, so each machine's config 'box1.xml', 'box2.xml' can just be a pointer to a real config file 'staging.xml' which is then read.
> What do you mean by a full config? What is > the name of the config file? In what directory does it exist?
They are stored as xml files in the WAR; loaded using Class.getResourceAsStream()
>What causes it to get loaded?
I have some class registered as a recipient of webapp lifecycle events; this loading is done there
>What class do I use to read the properties?
Whatever one you want to write. You can read them in using something like castor and JAXB, or be fancy and use xpath to demand read items.
