-
1. Re: Where to store Application wide configuration?
andygodwin Mar 1, 2003 11:57 AM (in response to rdefalco)Don't know if this helps, but in a recent project
I used a Dynamic MBean to do this, called it simply
the Config Service. Read the configuration data
from a file at startup then bound itself into JNDI.
The configuration properties simply appeared as
attributes of the Dynamic MBean.
EJBs, etc, access the Config Service either using
MBeanServer methods, getAttribute(..) etc, or by
looking up the service from JNDI and calling on
the returned proxy. The JNDI approach would work
in a clustered setup with HA-JNDI, for a guess.
Also the service appears in the JMX console, so
you can monitor or update properties from the
console.
Because my app integrated with non Java systems,
the Config Service also opened a server socket
to accept requests using a simple XML protocol.
I don't know about different app servers, but they
are all starting to adopt JMX and MBeans aren't
they? If not, it's about time they did :)
HTH
Andy