2011年8月27日 星期六

The Java Naming and Directory Interface (JNDI)

(from JWorld@TW Java論壇 - JNDI觀念)


* The Java Naming and Directory Interface (JNDI) is a Java API for a directory service that allows Java software clients to discover and look up data and objects via a name.

* Like all Java APIs that interface with host systems, JNDI is independent of the underlying implementation.

* Additionally, it specifies a service provider interface (SPI) that allows directory service implementations to be plugged into the framework. It may make use of a server, a flat file, or a database; the choice is up to the vendor.

* 在 J2EE 中,JNDI 是把 J2EE 應用程式何在一起黏著劑,將資源取名字,提供命名服務,以可以根據名字來找到資源。假設要連的對象是書,而JNDI是圖書管理員,把書碼告訴管理員便會找到相對應的書

* JNDI is a connection pool,工作效率比直接連接好。

* JNDI 是一種樹狀的檔案系統結構,每個節點都可以儲存任何物件,客戶端程式可以透過 JNDI path 來查詢所儲存的物件或是更新物件的值,延伸到 client-server 的觀念,就好比存取網路磁碟的檔案一樣。

* 只不過 JNDI 的路徑的定義跟檔案系統的定義不太相同,儲存的內容也不限是檔案而是廣義的物件。


* Reference
- 请问个位JNDI到底是什么意思呀,始终没有理解清楚 - Java / Java SE
- Java Naming and Directory Interface - Wikipedia, the free encyclopedia
- JWorld@TW Java論壇 - JNDI觀念

沒有留言:

張貼留言