当前位置:网站首页 > Java教程 > 正文

java jndi教程



The Java Naming and Directory Interface™ (JNDI) is an application programming interface (API) that provides naming and directory functionality to applications written using the Java™ programming language. It is defined to be independent of any specific directory service implementation. Thus a variety of directories -new, emerging, and already deployed can be accessed in a common way.

The JNDI architecture consists of an API and a service provider interface (SPI). Java applications use the JNDI API to access a variety of naming and directory services. The SPI enables a variety of naming and directory services to be plugged in transparently, thereby allowing the Java application using the JNDI API to access their services. See the following figure:

JNDI Architecture

JNDI is included in the Java SE Platform. To use the JNDI, you must have the JNDI classes and one or more service providers. The JDK includes service providers for the following naming/directory services:

  • Lightweight Directory Access Protocol (LDAP)
  • Common Object Request Broker Architecture (CORBA) Common Object Services (COS) name service
  • Java Remote Method Invocation (RMI) Registry
  • Domain Name Service (DNS)

Other service providers can be downloaded from the or obtained from other vendors.

The JNDI is divided into five packages:

  • javax.naming
  • javax.naming.directory
  • javax.naming.ldap
  • javax.naming.event
  • javax.naming.spi

The next part of the lesson has a brief description of the JNDI packages.

版权声明


相关文章:

  • java大学教程电子版2024-12-05 15:58:04
  • java wb界面设计教程2024-12-05 15:58:04
  • jar使用教程java2024-12-05 15:58:04
  • java数据编程教程2024-12-05 15:58:04
  • wsdl2java教程2024-12-05 15:58:04
  • suse java 安装教程2024-12-05 15:58:04
  • java全局教程2024-12-05 15:58:04
  • java webservices教程2024-12-05 15:58:04
  • ajax教程 java2024-12-05 15:58:04
  • java视频教程 类2024-12-05 15:58:04