JNDI学习笔记一(Me)
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://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-plat-419418.html#7110-jndi-1.2.1-oth-JPR
或
http://java.sun.com/products/jndi/downloads/index.html#DOWNLOAD12
?
?
2.
?
?
?
?
?
?
?
?
?
?
?
?
?
?