Article View: cn.bbs.comp.lang.java
Article #23000Re: ���ʣ�JBuilder7����CMP EJB������
From: �㶹����
Date: Sun, 24 Aug 2003 10:18
Date: Sun, 24 Aug 2003 10:18
20 lines
2335 bytes
2335 bytes
��Ȼ��local���Ͳ���narrow�ģ�������ֻҪֱ����lookup�����ˡ�
Ϊʲô����ֱ���û������������п�����Ӧ�÷�����ǰһ�ε�״̬��û�����廹
�����������ϸ˵����
EJB�淶�ж�home�ӿڶ��ǹ涨xxxHome�ģ�ûʲô��ֵġ�
�� �� Sayforever (Sayforever) �Ĵ������ᵽ: ��
: �������֣�������jbuilder7����һ��CMP BEAN��ֻ�����local�ӿڣ���ͨ��servlet����
: ��servlet�Ĵ�����
: javax.naming.InitialContext ctx = new javax.naming.InitialContext(p);
: Object ref = ctx.lookup("Book");
: BookHome home = (BookHome)javax.rmi.PortableRemoteObject.narrow(ref, BookHome.
: class);[BookHome�DZ��ؽӿڣ�Jbuilder��ɵĽӿ������е�֣���]
: ���н����ʾΪjava.lang.ClassCastException: myejb.BookBean_18i6h_LocalHomeImpl
: ����֪��Ϊʲô���Һ���ֱ����BookHome home=(BookHome)ctx.lookup("Book");�������
: ��������Զ�̽ӿ�������һ��,һ������Ϊ��Ϻ֪��ʲô���������ˣ�����
--
http://bbs.sjtu.edu.cn/showfile?name=�š�Ь.jpg
[m[1;32m�� ��Դ:����ˮ˼Դ bbs.sjtu.edu.cn��[FROM: 211.80.42.160][m
Technical Details
Message-ID:
<480G19$8yV@bbs.sjtu.edu.cn>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newshosting.com!news-xfer2.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.neu.edu.cn!SJTUShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: f6cb0,edeea6c22291bf33,start X-Google-Attributes: gidf6cb0,public X-Google-ArrivalTime: 2003-08-24 03:18:03 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newshosting.com!news-xfer2.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.neu.edu.cn!SJTU From: peasefish.bbs@bbs.sjtu.edu.cn (�㶹����) Newsgroups: cn.bbs.comp.lang.java Subject: Re: ���ʣ�JBuilder7����CMP EJB������ Date: 24 Aug 2003 10:18:10 GMT Organization: ��ˮ˼Դ Message-ID: <480G19$8yV@bbs.sjtu.edu.cn> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Filename: Java/M.1061720121.A Lines: 20