In Java EE 5, injection only works for managed objects such as ejbs
servlets or jsf managed beans (i.e. those objects for which the
container handles the lifecycle).
Packaging isn't really relevant here.
Also, when making JNDI calls, make sure you're using the jndi names as
returned by "asadmin list-jndi-entries".
-Alexis
On Feb 19, 2009, at 3:20, glassfish_at_javadesktop.org wrote:
> Maybe I'm missing something but I thought that Session Beans and
> JNDI lookups were supposed to be available to any POJO within the
> same application server.
> I have a POJO in an enterprise app within netbeans running under
> glassfish.
>
> It is being called by a web-app thats part of the same enterprise
> pakage within netbeans but any time I try to access a session bean
> or javamail session I get a "No object bound to name" error.
>
> If I make my POJO in the ejb-app a session bean then I can inject it
> into the web-app and everything works fine.
> Maybe my understanding of the injection process is incorrect.
> Is it the case that POJOs can only access local EJBs if they are in
> a web-app deployed on the same server.
> [Message sent by forum member 'axlesoft' (axlesoft)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332792
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>