what's the best and most J2EE-compliant way to define EAR-wide configuration entries that are registered with JNDI? I have to be able to lookup the value from any EJB component withing the EAR file and don't want to specify the value for each EJB using the env-entry mechanism. Additionally, theses values should not be shared with any other EARs deployed.
Thanks in advance,
You can have a property file that stores name value pairs, read them at deploy time using servlet init or setcontexts and store them in JNDI. That way, any J2ee component can access the values.
One more way to do this is to store it using a MBean so you can make these properties available using the jmx-console. u would still need to store it in jndi though.