bas4.51:
Context ctx = new InitialContext();
Object ref = ctx.lookup("ejbbean");webshere我没用过,没必要都知道吧,服务器多呢

解决方案 »

  1.   

    webshpere上
    p.put(Context.PROVIDER_URL,          
                  “iiop://192.168.2.7:900”);
    p.put(Context.INITIAL_CONTEXT_FACTORY,           
                  “com.ibm.ejs.ns.jndi.CNInitialContextFactory”);        
    //192.168.2.7为服务器IP,900为端口号 
      

  2.   

    backlove你那是testclient的写法,独立的client是不行的,
    roamer请问webshere支持ejb1.1吗?我记得好象只支持1.0,
      

  3.   

    xixi,我用的是weblogic,bas只在jb4下做过一个,见笑了
      

  4.   

    websphere3.5只支持ejb1.0
    不过听说新出的websphere4.0支持ejb1.1,不过没见过.
      

  5.   

    ejb2.0规范都出来了,
    weblogic6支持ejbql,
    websphere4可以吗
      

  6.   

    websphere 4 只支持 EJB1.1
      

  7.   

    to winsome_zhong(草履虫):
    ,哈,被你一逼,只有出手了。
    String sProviderURL= "iiop://localhost:8080";//这是bas45本地开发的地址,实际过程中与你的配置有关 //String sJNDIFactory= "com.ibm.ejs.ns.jndi.CNInitialContextFactory";
            //0.
            //Bas Factory
            String sJNDIFactory= "com.inprise.j2ee.jndi.CtxFactory";
    //JNDI的制造者;
    System.out.println("ProviderURL : "+sProviderURL);
    try
    {
    // Get an InitialContext
    Properties h= new Properties();
    //WebLogic6.0
    //h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    //WebSphere
    h.put(Context.INITIAL_CONTEXT_FACTORY, sJNDIFactory);
                    //Borland Application Server
    h.put(Context.PROVIDER_URL, sProviderURL);
    return new InitialContext(h);
    }
    catch (NamingException ne)
    {
    System.out.println(ne);
    System.out.println(
    "We were unable to get a connection to the WebLogic server at " + sProviderURL);
    System.out.println("Please make sure that the server is running.");
    //throw ne;
    return null;
    }
      

  8.   

    iiop这一句,可能有误,缺省安装的BAS端口是14000;
    String sProviderURL= "iiop://localhost:14000";
    实际格式是 iiop://bas安装机器的IP:Bas的port