Presentation is loading. Please wait.

Presentation is loading. Please wait.

卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘.

Similar presentations


Presentation on theme: "卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘."— Presentation transcript:

1 卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘

2 Outline  Naming and Directory Concepts  What is JNDI?  JNDI Overview  Preparations

3 Naming and Directory Concepts  The primary function of a naming system is to map names to objects. It maps people-friendly names to addresses, identifiers, or objects typically used by computer programs. For example, the Internet Domain Name System (DNS) maps machine names (such as www.sun.com) to IP addresses (like 192.9.48.5). A file system maps a file name (c:\bin\autoexec.bat for example) to a file handle that a program can use to access the contents of the file.Internet Domain Name System (DNS)

4 Naming and Directory Concepts(cont.)  Directory : A directory object is a particular type of object that is used to represent the variety of information in a computing environment. A printer directory object, for example, might be used to represent a printer  Attributes : A directory object can have attributes associated with it. For example, a printer directory object might have as attributes its speed, resolution, and color. A user directory object might have as attributes the user's email address, various telephone numbers, postal mail address, and computer account information. An attribute has an attribute identifier and a set of attribute values. The email address, for example, might have an attribute identifier of "mail" and value of "john.smith@somewhere.com".

5 What is JNDI?  The Java TM Naming and Directory Interface TM (JNDI) is an API specified in the Java programming language. It provides naming and directory functionality to applications written in the Java programming language. The JNDI is defined to be independent of any specific directory service implementation. Thus, a variety of directories--new, emerging, and already deployed ones--can be accessed in a common way.namingdirectory

6 JNDI Overview  The JNDI architecture consists of an API (Application Programming Interface) and an SPI (Service Provider Interface). Java applications use the JNDI API to access a variety of naming and directory services. The JNDI SPI enables a variety of naming and directory services to be plugged in transparently, allowing the Java application using the JNDI API to access their servicesThe JNDI SPI

7 JNDI Overview(cont.)

8  The JNDI is divided into three packages –javax.namingjavax.naming –javax.naming.directoryjavax.naming.directory –javax.naming.spijavax.naming.spi

9 Preparations  Required Software –Here's a checklist of software/systems that you need:  Java Platform Software Java Platform Software  JNDI Software JNDI Software  Service Provider Software Service Provider Software  Naming and Directory Server Software Naming and Directory Server Software

10 JNDI Overview(cont.)  Context –Lookup() : Printer printer = (Printer)ctx.lookup("treekiller"); printer.print(report);  Names  Bindings  The Initial Context  Exceptionsbackback

11 JNDI Overview(cont.)  The Directory Context –getAttributes()getAttributes() –modifyAttributes()modifyAttributes() –Searchesbackback


Download ppt "卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘."

Similar presentations


Ads by Google