Hi, I am using Inprise Application Server to do an EJB related project. I have a problem to lookup a bean from another bean. For example, I have two stateless beans, ABean and BBean. BBean returns a string "Hello" to who ever calls it. ABean lookup BBean and get that string and then return the string to ABean's caller. But, when my client calls ABean, client gets nothing. If client calls BBean, it gets the string. I use the following statements in ABean to lookup (get reference) BBean:
Context ctx = new InitialContext();
Object ref = ctx.lookup("bbeanhomename");
BBeanHome home = (BBeanHome)javax.rmi.PortableRemoteObject
BBean b = home.creat();
Also, I tried another way to lookup BBean by using statement:
Object ref = ctx.lookup("java:comp/env/ejb/BBeanHome");
and this one doesn't work also. From Inprise's documentation, it says that if I want to use this one, I have to set the property "java.naming.factory.url.pkgs = com.inprise.j2ee". But where and how?
Thank you for your help.
Happy Christmas and Happy New Year.