Topic: 也是JNDI的问题?(急,在线等) |
Print this page |
1.也是JNDI的问题?(急,在线等) | Copy to clipboard |
Posted by: bluebangbang Posted on: 2004-02-26 14:12 interface IPKGenerator extend Remote :实现远程接口 class PKGenerator implements IPKGenerator extends PortableRemoteObject {} :实现远程对象 创建 stub && skeleton 后 class Startup { PKGnenrator generator = new PKGenerator() Context ctx = new InitialContext(System.getProperties()); ctx.rebind("gene",generator); ...... } java -Djava.naming.factory=sun.com.jndi.fscontext.RefFSContextFactory Startup Exception :cannot only bind Reference or Referencable Object ???? WHY: who can tell me the reason? |
2.Re:也是JNDI的问题?(急,在线等) [Re: bluebangbang] | Copy to clipboard |
Posted by: Wisen Posted on: 2004-02-26 14:44 JVM参数中要提供javax.naming.Context.PROVIDER_URL的值。我的程序是这样的: Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory"); ht.put(Context.PROVIDER_URL, "file:///c:"); Context ctx = new InitialContext(ht); |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |