users@glassfish.java.net

lookup of env-entry from MDB

From: <glassfish_at_javadesktop.org>
Date: Mon, 14 Jul 2008 07:15:31 PDT

Hi there,

I'm trying to lookup an env-entry for my EJB3.0 MDB. The ejb-jar.xml portion looks as follows:

<env-entry>
<description>description</description>
<env-entry-name>someString</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>foobar</env-entry-value>
</env-entry>

I try to access this entry with:
(String)namingContext.lookup( "java:comp/env/someString" );

But when the @PostConstruct method gets called I get:
javax.naming.NameNotFoundException: No object bound to name java:comp/env/someString

Any help is much appreciated. I did not find a place in Glassfish where I can browse this. In the JNDI view it is not shown.

Thanks in advance and best regards,
Chris
[Message sent by forum member 'chrjohn' (chrjohn)]

http://forums.java.net/jive/thread.jspa?messageID=286425