geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <ammul...@alumni.princeton.edu>
Subject Re: Help! Geronimo+JNDI
Date Thu, 14 Oct 2004 17:49:55 GMT
	In general, I think we would encourage Rohit to use a J2EE client 
running in our client container, so he can map EJB references in his 
deployment descriptors instead of trying to look them in using a global 
JNDI tree.

	That said, I haven't tried any client stuff at all, in the 
container or not, so I can't give specific advice.  I know some of the 
tests run in a client container, though I don't know if they hit EJBs.

Aaron

On Thu, 14 Oct 2004, Davanum Srinivas wrote:
> Can someone help Rohit?
> 
> thanks,
> dims
> 
> 
> On Thu, 14 Oct 2004 21:32:59 +0530, Varicatt, Rohit (Cognizant)
> <vrohit@blr.cognizant.com> wrote:
> > 
> > 
> > Hi Davanum,
> > 
> > This is probably inappropriate, but having been on the Geronimo mailing
> > list,I decided to try Geronimo out and am up against a roadblock. I
> > wrote a simple HelloWorldBean and successfully deployed it. But my
> > client repeatedly gives me a NameNotFoundException. Am I doing something
> > wrong? I would be very grateful if you could help me.
> > 
> > The client code :
> > import java.util.Hashtable;
> > import javax.naming.InitialContext;
> > import javax.naming.NamingException;
> > public class FirstClient {
> >         public static void main(String[] args) {
> >                 try {
> >                         Hashtable env = new Hashtable();
> >                         env.put(
> >                                 "java.naming.factory.initial",
> > 
> > "com.sun.jndi.rmi.registry.RegistryContextFactory");
> >                         env.put("java.naming.factory.url.pkgs",
> > "org.apache.geronimo.naming");
> >                         env.put("java.naming.provider.url",
> > "rmi://localhost:1099");
> >                         InitialContext ctx = new InitialContext(env);
> >                         Object lookupResult =
> > ctx.lookup("HelloWorldHome");
> >                 }
> >                 catch (NamingException e) {
> >                         e.printStackTrace();
> >                 }
> >         }
> > }
> > 
> > The jndi-name I have declared in openejb-jar for my bean is
> > "HelloWorldHome".
> > 
> > Thank you,
> > Rohit
> > 
> > This e-mail and any files transmitted with it are for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
> > If you are not the intended recipient, please contact the sender by reply e-mail
and destroy all copies of the original message.
> > Any unauthorised review, use, disclosure, dissemination, forwarding, printing or
copying of this email or any action taken in reliance on this e-mail is strictly
> > prohibited and may be unlawful.
> > 
> 
> 
> -- 
> Davanum Srinivas - http://webservices.apache.org/~dims/
> 

Mime
View raw message