lookup哪个接口?
我在用jbuilder和weblogic编辑会话bean和实体bean时,jbuilder自己生成的客户端部分代码是:
Context context = getInitialContext();
Object ref = context.lookup("Studentses");
studentsesHome = (StudentsesHome) PortableRemoteObject.narrow(ref, StudentsesHome.class);
而我看得所有的书,lookup里的参数都是home接口,即应该是这样的:
Object ref = context.lookup("StudentsesHome");
而jbuilder生成的却是:Object ref = context.lookup("Studentses");
如果我把它改为:Object ref = context.lookup("StudentsesHome");编译有错。
这到底是怎么回事?到底应该是怎样的?
能提供一个session bean + entity bean + 数据库(如oracle)的例子吗?