users@glassfish.java.net

Re: jndi lookup of local session bean

From: Sahoo <Sahoo_at_Sun.COM>
Date: Wed, 03 Oct 2007 13:45:58 +0530

Local session beans do *not* have global JNDI names in GlassFish. You
can use java:comp/env namespace to name them and access them from
another component in the same application. Please refer to
https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html which covers
this topic very well.

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> I want to look up a local stateless session bean inside my container by another stateless session bean...
>
>
>
> basically I have one interface (stateless session bean) that is implemented by 3 otheres
> so OpeartorResolver interface which is alocal stateless session bean is implemented by AuResolver
> USResolver CAResolver now I need to lookup AuResolver dynamically ...so basically do a context.lookup of AUResolver any idea how I can do that
> so
> package com.bla.bla.bean;
> public class WhichResolver implements OperatorResolver{
> @Resource private javax.ejb.SessionContext ejbContext;
> public String returnStuff(String args)
> {
> Object obj=ejbContext.lookup("com.bla.bla.bean.AUResolver");
>
> }
>
> Cheers
> PRiya
> [Message sent by forum member 'priyasubu' (priyasubu)]
>
> http://forums.java.net/jive/thread.jspa?messageID=238198
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>