标记到底有什么作用?

tcjj 2002-10-30 03:18:24
<ejb-ref>
<ejb-ref-name>ejb/EmplRecord</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.wombat.empl.EmployeeRecordHome</home>
<remote>com.wombat.empl.EmployeeRecord</remote>
<ejb-link>EmployeeRecord</ejb-link>
</ejb-ref>

在这段xml文件中,有没有<ejb-link>会有什么不同?
高手请指点。
...全文
117 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
313fxq 2002-10-31
  • 打赏
  • 举报
回复
看看下面的描述:
If the referred bean is defined in the same ejb-jar file, the optional ejb-link element of the ejb-ref or ejb-local-ref element may be used to specify the actual referred bean. The value of the ejb-link element is the name of the target enterprise bean, i.e. the name defined in the ejb-name element of the target enterprise bean.
buick555 2002-10-30
  • 打赏
  • 举报
回复
其实去掉也没有什么影响,本来<ejb-link/>就是<ejb-ref/>中的一个可选项,只是表示<ejb-ref-name/>中的jndi名所指向的另一个EJB的<ejb-name/>
313fxq 2002-10-30
  • 打赏
  • 举报
回复
对于ejb-ref可以省略,可能不同的应用服务器有不同的要求,在JBoss里面配置好jboss.xml文件后,对于ejb-ref,ejb-link可以省略掉,不会影响。
但是对于ejb-local-ref,不行。

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧