views:

74

answers:

1

I want to put some instance specific configuration information in JNDI. I looked at the information here: http://www.adobe.com/support/jrun/working_jrun/jrun4_jndi_and_j2ee_enc/jrun4_jndi_and_j2ee_enc03.html

I have added this node to the web.xml:

<env-entry>
  <description>Administrator e-mail address</description>
  <env-entry-name>adminemail</env-entry-name>
  <env-entry-value>[email protected]</env-entry-value>
  <env-entry-type>java.lang.String</env-entry-type>
</env-entry>

In coldfusion I have tried several different approaches to querying the data:

<cfset ctx = createobject("java","javax.naming.InitialContext") >

<cfset val = ctx.lookup("java:comp/env") >

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.

<cfset val = ctx.lookup("java:comp/env/adminemail") >
No such binding: adminemail 

Preforming a listBindings returns an empty jrun.naming.JRunNamingEnumeration.

<cfset val = ctx.listBindings("java:comp/env") >

I only want to put a string value (probably several) into the ENC (or any JNDI directory at this point).

A: 

Never used it, but I got curious so I decided to try ... with no success.

I found this though, hopefully it helps you.

http://www.adobe.com/livedocs/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&amp;file=00001570.htm

jfrobishow