到http://localhost:8080/jmx-console/里看看你的ejb部署上没有,要是部署上了,看看部署的jndi名字是不是HelloHome

解决方案 »

  1.   

    部署上了,用jb里的那个ejb测试客户端调用成功
      

  2.   

    try{
          Context context=new InitialContext();
          Object ref=context.lookup("MShopController");
          MShopControllerHome home=(MShopControllerHome)PortableRemoteObject.narrow(ref,MShopControllerHome.class);
        }catch(Exception e){
          e.printStackTrace();
      }
    //MShopController是我的ejb jndi名字,