专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > JBoss

jboss-5.1.0.GA 怎么声明bean 既是remote也是local

发布时间:2010-06-14 17:12:11 文章来源:www.iduyao.cn 采编人员:星星草
jboss-5.1.0.GA 如何声明bean 既是remote也是local
@Stateless
@Remote
@Local
public class ……


这样会出错,要如何声明?

------解决方案--------------------
是这样申明的,你可以这样来设计比价好,
public interface StudentRemote{ //这里面可以些你的远程接口
...
}
public interface Student extends StudentRemote{ //这里面写你的本地借口
.....
}

@Stateless
@Local({Student.class})
@Remote({StudentRemote.class})
public class StudentBean implements Student{
......
}
------解决方案--------------------
楼上不错,是个无状态的会话bean
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: