hi srinivas
try the below in your client program ...i was wondering how to access the
jndi service without having a getInitialContext method ....here is what
normally i use to test my beans ...try it ...it should work ...am also in
the process of exploring EJB ....all i can say is this is one way of gettin
your home object
try{
Context ctx = getInitialContext();
Object ref = (HelloHome)ctx.lookup("MyHell");
HelloHome home =
(HelloHome)javax.rmi.PortableRemoteObject.narrow(objref,HelloHome.class);
Hello hello = home.create();
String s = hello.Hello();
System.out.println(s);
}catch (Exception e){}
public static javax.naming.Context getInitialContext() throws
javax.naming.NamingException{
Properties p = new Properties();
//weblogic
specific****************************************************************
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL, "t3://localhost:7001");
//weblogic
specific*****************************************************************
return new javax.naming.InitialContext(p);
}
----------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is
addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or taking of any
action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received this in
error, please contact the sender and delete the material from any
computer.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".