把他们部署后,利用lookup(),不行吗?

解决方案 »

  1.   

    properties = new Properties();
          properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
          properties.put(Context.PROVIDER_URL, t3://你的IP:7001);
          //look up jndi name
          Object ref = context.lookup("UsersRemote");
          //look up jndi name and cast to Home interface
          usersHome = (UsersHome) PortableRemoteObject.narrow(ref, UsersHome.class);
    这样找不到吗?报什么错?
      

  2.   

    如果这两JAR在一个应用中,
    可以使用 <ejb-ref>, link名称为<jar文件名#ejb名>如果这两JAR不在一个应用中,通过JNDI访问。