那要看你application server是用哪个了如果用iplanet application server
应是
Properties env=new Properties();
env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
env.put("java.naming.provider.url","iiop://localhost:9010");Context ctx = new InitialContext(env);
Object ref = ctx.lookup("Enterprise1");
enterprise1Home = (Enterprise1Home) PortableRemoteObject.narrow(ref, Enterprise1Home.class);
应是
Properties env=new Properties();
env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
env.put("java.naming.provider.url","iiop://localhost:9010");Context ctx = new InitialContext(env);
Object ref = ctx.lookup("Enterprise1");
enterprise1Home = (Enterprise1Home) PortableRemoteObject.narrow(ref, Enterprise1Home.class);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货