Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java EE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 EJB如何调用server本地方法
yanger





发贴: 83
积分: 30
于 2003-03-18 13:24 user profilesend a private message to usersend email to yangersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我的设计(图)

请问:如何用EJB里面的实现方法进行server本地的(class)方法调用?

我的jar文件中有 TranService.class TranServiceEJB.class TranServiceHome.class

和 jar file同级的有一个war,war里面有WIN-INF/classes/helloworldEJB.class(这是个普通类)

现在,我的client可以调用到TranService.process(),process方法里面将调用helloworld.class 的getName(),请问如何实现?
现在的错误:
lookup
do post begin
SysLogger has been initialized.
=============begin===================
fcode=helloworldEJB
jaction.simple.HelloWorldEJB
MainProcess(getClassOfInvoke):找不到指明的类java.lang.ClassNotFoundException: ja
ction.simple.HelloWorldEJB
Exception(tranService):java.lang.Exception: ClassNotFoundException(getClassOfInv
oke):java.lang.ClassNotFoundException: jaction.simple.HelloWorldEJB



作者 0 [Re:yanger]
yanger





发贴: 83
积分: 30
于 2003-03-18 13:26 user profilesend a private message to usersend email to yangersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
请指教,十分谢谢。


作者 Re:EJB如何调用server本地方法 [Re:yanger]
jameszhang



CJSDN高级会员


发贴: 1594
积分: 111
于 2003-03-18 14:06 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
好象直接调用没什么特别


作者 Re:EJB如何调用server本地方法 [Re:yanger]
yanger





发贴: 83
积分: 30
于 2003-03-18 16:30 user profilesend a private message to usersend email to yangersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
可是,调用不到,根本找不到相关的类


作者 Re:EJB如何调用server本地方法 [Re:yanger]
whisperwind





发贴: 170
积分: 20
于 2003-03-18 22:04 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
要放在你的ejb的发布包中


作者 Re:EJB如何调用server本地方法 [Re:yanger]
yanger





发贴: 83
积分: 30
于 2003-03-18 22:36 user profilesend a private message to usersend email to yangersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不放在ejb发布包中不行吗?
我是打算用EJB作为远程调用的借口,调用本地的业务实现类,业务实现类是十分的分散的,都要打到jar包中吗?
那样,多不容易开发阿。



作者 Re:EJB如何调用server本地方法 [Re:yanger]
yanger





发贴: 83
积分: 30
于 2003-03-20 09:25 user profilesend a private message to usersend email to yangersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
没人帮助吗?


作者 Re:EJB如何调用server本地方法 [Re:yanger]
sundayrain88



发贴: 0
积分: 0
于 2003-03-24 11:58 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我用jbuilder7做过,在里面有个选项就是把调用本地的ejb在一个
操作里面添加上:
双击你的bean出现一个对你的bean
描述的窗口,然后点ejb local references 就会出现一个列表,
然后把你想调用的本地bean添加上,就可以了.
我没有看他的配置文件,可能在配置文件里会有相应描述.



作者 Re:EJB如何调用server本地方法 [Re:yanger]
sundayrain88



发贴: 0
积分: 0
于 2003-03-24 12:02 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我看了一下配置文件:
<ejb-local-ref>
<description />
<ejb-ref-name>Sheet</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>weblogic.SheetHome</local-home>
<local>weblogic.Sheet</local>
<ejb-link>Sheet</ejb-link>
</ejb-local-ref>
<ejb-local-ref>
<description />
<ejb-ref-name>LineConfigure</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>weblogic.LineConfigureHome</local-home>
<local>weblogic.LineConfigure</local>
<ejb-link>LineConfigure</ejb-link>
</ejb-local-ref>
在ejb-jar.xml中有相对应的项,我想你添加这些东西,就可以调用本地萡安
这是ejb2.0的新特性:她是引用,而不是像远程调用那样.



作者 Re:EJB如何调用server本地方法 [Re:yanger]
yanger





发贴: 83
积分: 30
于 2003-03-31 09:42 user profilesend a private message to usersend email to yangersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不对,这是本地调用。。。



flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923