代码之家  ›  专栏  ›  技术社区  ›  Pokuri

当两个有状态bean扩展单个远程接口时会发生什么

  •  0
  • Pokuri  · 技术社区  · 15 年前

    当两个无状态bean实现单个远程接口且名称相同时,将哪个无状态bean实例分配给EJB对象以服务于客户端

    前任:

    @Stateless(name="KING")
    public class One implements RemoteInterface{
    
    }
    
    @Stateless(name="KING")
    public class Two implements RemoteInterface{
    
    }
    
    2 回复  |  直到 15 年前
        1
  •  0
  •   Adeel Ansari    15 年前

    我想你很可能会 CreateException NameAlreadyBoundException ,但不确定。试试看,为什么不呢?

        2
  •  0
  •   Murat Can ALPAY    15 年前