1. 使用JNDI需要先到Sun官方网站现在相应的jar
例:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.rmi.registry.RegistryContextFactory"); //需要下载RMI Registry Service Provider, 1.2.1 jar
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
//需要下载File System Service Provider, 1.2 Beta 3 jar
下载地址:
或
http://java.sun.com/products/jndi/downloads/index.html#DOWNLOAD12
2.
本文详细介绍了如何使用JNDI(Java Naming and Directory Interface)进行配置,并提供了下载相应jar包的链接。
412

被折叠的 条评论
为什么被折叠?



