当我创建 EJB 并且既不使用 Remote
也不使用 Local
注释时,那么只能从本地甚至远程访问该 bean 吗?我的意思是哪个是默认行为?
最佳答案
如果 bean 实现除 Serialized 等之外的单个接口(interface),则它将被视为 bean 的唯一(本地)业务接口(interface)。 (EJB 3.1 4.9.7)
如果 bean 没有实现任何适当的接口(interface),它将被视为没有接口(interface) View 的 bean。
如果它实现多个接口(interface),则必须使用相应的注释或部署描述符来定义业务接口(interface)。
关于java - 创建 session bean 而不添加远程或本地注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24479276/