读书人

JNDI学习札记一(Me)

发布时间: 2012-06-27 14:20:09 作者: rapoo

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.

?

?

?

?

?

?

?

?

?

?

?

?

?

?

读书人网 >软件架构设计

热点推荐