0 Replies Latest reply on Nov 12, 2004 8:31 AM by Oliver Henning

    Primitive Values (String, Integer etc.) in JNDI Namespace

    Oliver Henning Newbie

      Hello together

      how can i define a simple Value (String, Integer, Char, Short etc.) in the JNDI Tree. But the Value shall not be packaged in an EAR/WAR/EJB-jar. The Server Administrator shall be responsible for that value, and he must not change values in the Deployment-Package.

      In other Words i need somthing like this:
      In the EJB:

      Context ctx=new InitialContext();
      String cfg=(String)ctx.lookup("java:comp/env/MyConfigKey");

      In ejb-jar.xml:
       <description>Admin, give me a String here please</description>

      And the rest shall be only somewhere in the Server-Config, but not in the EAR, because the Value is only known by the Server-Admin.

      In Tomcat the Server-Admin can simply place a Element within a Element in the central server.xml-Config-File to propagate such simple values to the Application.

      THX for helping me.
      Oli Henning