users@glassfish.java.net

Re: Invocation Exception - Can't lookup the java:comp/env namespace!

From: <glassfish_at_javadesktop.org>
Date: Thu, 21 Jun 2007 08:48:53 PDT

Hi Marco,

>> Now glassfish should define the name "java:comp/env/ejb/DicomQueryDealer" under the scope
>> of DpacsBeanManager and all the pojo that (in this case) are inside the same ejb module (jar)
>> and also in the same EAR.

This is not the way the component environment works for EJB components. The
component environment (java:comp/env/) is private for each EJB component. That's different
from web components, where there is a single component environment shared across the entire
.war. That means if you define an entry within DpacsBeanManager's environment, it will only
be accessible to DpacsBeanManager bean class and any utility code or pojos that called from
 within DpacsBeanManager methods.
[Message sent by forum member 'ksak' (ksak)]

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