title: access JRUN jndi environment vaiables from coldfusion (java)
body: <p>I want to put some instance specific configuration information in JNDI. I looked at the information here:
  <a href="http://www.adobe.com/support/jrun/working_jrun/jrun4_jndi_and_j2ee_enc/jrun4_jndi_and_j2ee_enc03.html" rel="nofollow noreferrer">http://www.adobe.com/support/jrun/working_jrun/jrun4_jndi_and_j2ee_enc/jrun4_jndi_and_j2ee_enc03.html</a></p>
  
  <p>I have added this node to the web.xml:</p>
  
  <pre><code>&lt;env-entry&gt;
    &lt;description&gt;Administrator e-mail address&lt;/description&gt;
    &lt;env-entry-name&gt;adminemail&lt;/env-entry-name&gt;
    &lt;env-entry-value&gt;admin@mystore.com&lt;/env-entry-value&gt;
    &lt;env-entry-type&gt;java.lang.String&lt;/env-entry-type&gt;
  &lt;/env-entry&gt;
  </code></pre>
  
  <p>In coldfusion I have tried several different approaches to querying the data:</p>
  
  <pre><code>&lt;cfset ctx = createobject("java","javax.naming.InitialContext") &gt;
  
  &lt;cfset val = ctx.lookup("java:comp/env") &gt;
  </code></pre>
  
  <p>That lookup returns a jrun.naming.JRunNamingContext.  If i preform a lookup on ctx for the specific binding I am adding I get an error.  </p>
  
  <pre><code>&lt;cfset val = ctx.lookup("java:comp/env/adminemail") &gt;
  No such binding: adminemail 
  </code></pre>
  
  <p>Preforming a listBindings returns an empty jrun.naming.JRunNamingEnumeration.</p>
  
  <pre><code>&lt;cfset val = ctx.listBindings("java:comp/env") &gt;
  </code></pre>
  
  <p>I only want to put a string value (probably several) into the ENC (or any JNDI directory at this point).</p>