1 Reply Latest reply on Oct 5, 2003 7:25 AM by Raja

    EAR-wide configuration entries

    cstettler Newbie

      Hi all,

      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.

      Any ideas?

      Thanks in advance,
      Christian

        • 1. Re: EAR-wide configuration entries
          Raja Master

          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.

          -Raj