weblogic 7.0 ejb 已发布 但客户端始终不能调用 什么错呀? 你不说谁知道呢??? ------------------------------------------------------ 我们还年轻牛奶会有的奶牛也会有的 可天天在 csdn 混这些会有吗 ?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可能是:lookup(“list”)的问题,要看你的EJB部署描述符中的JDNI名字是怎么配置的,比如是“ejb/list”那么可以使用lookup("list");还有也可能根InitialContext有关如果你的ejb容器使用的是weblogic可以这样: String url = "t3://localhost:7001"; Properties properties = null; properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); properties.put(Context.PROVIDER_URL, url); Context ctx = new InitialContext(properties); String url = "t3://localhost:7001"; Hashtable props = new Hashtable(); props.put(InitialContext.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); props.put(InitialContext.PROVIDER_URL, url); //props.put Add User&Pass here Context ctx = new InitialContext(props); Object home=ctx.lookup("list"); listHome listHome=(listHome)home; list list=listHome.create(); return list.toString(); 客户端代码: Context ctx=new InitialContext(); 能不出错吗?本机上客户端和服务器在同一个jvm里面,客户端搬到别的机器二者的jvm不同了。解决方法同 fdyxjh(淘汰狼) //props.put Add User&Pass here使用如下:env.put(InitialContext.SECURITY_PRINCIPAL,"system");env.put(InitialContext.SECURITY_CREDENTIALS,"weblogic"); 刚学的菜鸟求教 Struts2 标签用法 有个问题始终不明白,开发门户网站,是用JSP好,还是ASP.NET好??请大侠指导·· 关于ActionForm的reset方法 哪种数据库在J2EE开发中相对重要一些? 求一个Spring的例子,五十分。 关于加载文件到内存问题 怎么在web service里通过post的方法到指定的页面上去自动做登录的动作呢? 下班前要是搞不定,我就去自杀! Java小白求解答 weblogic7.0+eclipse2.1+Lomboz 在eclipse中启动weblogic时 出现了一个错误 急啊!help
还有也可能根InitialContext有关如果你的ejb容器使用的是weblogic可以这样:
String url = "t3://localhost:7001";
Properties properties = null;
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL, url);
Context ctx = new InitialContext(properties);
Hashtable props = new Hashtable();
props.put(InitialContext.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
props.put(InitialContext.PROVIDER_URL, url);
//props.put Add User&Pass here
Context ctx = new InitialContext(props);
Object home=ctx.lookup("list");
listHome listHome=(listHome)home;
list list=listHome.create();
return list.toString();
env.put(InitialContext.SECURITY_PRINCIPAL,"system");
env.put(InitialContext.SECURITY_CREDENTIALS,"weblogic");