11
卓卓卓卓卓卓卓卓 JNDI Java Naming and Directory Interface 卓卓卓卓卓卓卓 卓卓卓 894346 卓卓卓

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

Embed Size (px)

Citation preview

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

卓越計劃進度報告JNDI

Java Naming and Directory Interface

網際網路實驗室報告人 894346 潘燕弘

Outline Naming and Directory Concepts What is JNDI JNDI Overview Preparations

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 wwwsuncom) to IP addresses (like 1929485) A file system maps a file name (cbinautoexecbat for example) to a file handle that a program can use to access the contents of the file

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 users 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 johnsmithsomewherecom

What is JNDI The JavaTM Naming and Directory InterfaceTM

(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

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 services

JNDI Overview(cont)

JNDI Overview(cont)

The JNDI is divided into three packagesndash javaxnaming

ndash javaxnamingdirectory

ndash javaxnamingspi

Preparations

Required Software ndash Heres a checklist of softwaresystems that you need

Java Platform Software

JNDI Software

Service Provider Software

Naming and Directory Server Software

JNDI Overview(cont)

Contextndash Lookup()

Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)

Names Bindings The Initial Context Exceptions back

JNDI Overview(cont) The Directory Context

ndash getAttributes()

ndash modifyAttributes()

ndash Searchesback

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
Page 2: 卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘

Outline Naming and Directory Concepts What is JNDI JNDI Overview Preparations

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 wwwsuncom) to IP addresses (like 1929485) A file system maps a file name (cbinautoexecbat for example) to a file handle that a program can use to access the contents of the file

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 users 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 johnsmithsomewherecom

What is JNDI The JavaTM Naming and Directory InterfaceTM

(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

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 services

JNDI Overview(cont)

JNDI Overview(cont)

The JNDI is divided into three packagesndash javaxnaming

ndash javaxnamingdirectory

ndash javaxnamingspi

Preparations

Required Software ndash Heres a checklist of softwaresystems that you need

Java Platform Software

JNDI Software

Service Provider Software

Naming and Directory Server Software

JNDI Overview(cont)

Contextndash Lookup()

Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)

Names Bindings The Initial Context Exceptions back

JNDI Overview(cont) The Directory Context

ndash getAttributes()

ndash modifyAttributes()

ndash Searchesback

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
Page 3: 卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘

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 wwwsuncom) to IP addresses (like 1929485) A file system maps a file name (cbinautoexecbat for example) to a file handle that a program can use to access the contents of the file

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 users 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 johnsmithsomewherecom

What is JNDI The JavaTM Naming and Directory InterfaceTM

(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

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 services

JNDI Overview(cont)

JNDI Overview(cont)

The JNDI is divided into three packagesndash javaxnaming

ndash javaxnamingdirectory

ndash javaxnamingspi

Preparations

Required Software ndash Heres a checklist of softwaresystems that you need

Java Platform Software

JNDI Software

Service Provider Software

Naming and Directory Server Software

JNDI Overview(cont)

Contextndash Lookup()

Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)

Names Bindings The Initial Context Exceptions back

JNDI Overview(cont) The Directory Context

ndash getAttributes()

ndash modifyAttributes()

ndash Searchesback

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
Page 4: 卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘

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 users 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 johnsmithsomewherecom

What is JNDI The JavaTM Naming and Directory InterfaceTM

(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

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 services

JNDI Overview(cont)

JNDI Overview(cont)

The JNDI is divided into three packagesndash javaxnaming

ndash javaxnamingdirectory

ndash javaxnamingspi

Preparations

Required Software ndash Heres a checklist of softwaresystems that you need

Java Platform Software

JNDI Software

Service Provider Software

Naming and Directory Server Software

JNDI Overview(cont)

Contextndash Lookup()

Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)

Names Bindings The Initial Context Exceptions back

JNDI Overview(cont) The Directory Context

ndash getAttributes()

ndash modifyAttributes()

ndash Searchesback

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
Page 5: 卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘

What is JNDI The JavaTM Naming and Directory InterfaceTM

(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

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 services

JNDI Overview(cont)

JNDI Overview(cont)

The JNDI is divided into three packagesndash javaxnaming

ndash javaxnamingdirectory

ndash javaxnamingspi

Preparations

Required Software ndash Heres a checklist of softwaresystems that you need

Java Platform Software

JNDI Software

Service Provider Software

Naming and Directory Server Software

JNDI Overview(cont)

Contextndash Lookup()

Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)

Names Bindings The Initial Context Exceptions back

JNDI Overview(cont) The Directory Context

ndash getAttributes()

ndash modifyAttributes()

ndash Searchesback

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
Page 6: 卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘

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 services

JNDI Overview(cont)

JNDI Overview(cont)

The JNDI is divided into three packagesndash javaxnaming

ndash javaxnamingdirectory

ndash javaxnamingspi

Preparations

Required Software ndash Heres a checklist of softwaresystems that you need

Java Platform Software

JNDI Software

Service Provider Software

Naming and Directory Server Software

JNDI Overview(cont)

Contextndash Lookup()

Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)

Names Bindings The Initial Context Exceptions back

JNDI Overview(cont) The Directory Context

ndash getAttributes()

ndash modifyAttributes()

ndash Searchesback

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
Page 7: 卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘

JNDI Overview(cont)

JNDI Overview(cont)

The JNDI is divided into three packagesndash javaxnaming

ndash javaxnamingdirectory

ndash javaxnamingspi

Preparations

Required Software ndash Heres a checklist of softwaresystems that you need

Java Platform Software

JNDI Software

Service Provider Software

Naming and Directory Server Software

JNDI Overview(cont)

Contextndash Lookup()

Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)

Names Bindings The Initial Context Exceptions back

JNDI Overview(cont) The Directory Context

ndash getAttributes()

ndash modifyAttributes()

ndash Searchesback

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
Page 8: 卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘

JNDI Overview(cont)

The JNDI is divided into three packagesndash javaxnaming

ndash javaxnamingdirectory

ndash javaxnamingspi

Preparations

Required Software ndash Heres a checklist of softwaresystems that you need

Java Platform Software

JNDI Software

Service Provider Software

Naming and Directory Server Software

JNDI Overview(cont)

Contextndash Lookup()

Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)

Names Bindings The Initial Context Exceptions back

JNDI Overview(cont) The Directory Context

ndash getAttributes()

ndash modifyAttributes()

ndash Searchesback

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
Page 9: 卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘

Preparations

Required Software ndash Heres a checklist of softwaresystems that you need

Java Platform Software

JNDI Software

Service Provider Software

Naming and Directory Server Software

JNDI Overview(cont)

Contextndash Lookup()

Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)

Names Bindings The Initial Context Exceptions back

JNDI Overview(cont) The Directory Context

ndash getAttributes()

ndash modifyAttributes()

ndash Searchesback

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
Page 10: 卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘

JNDI Overview(cont)

Contextndash Lookup()

Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)

Names Bindings The Initial Context Exceptions back

JNDI Overview(cont) The Directory Context

ndash getAttributes()

ndash modifyAttributes()

ndash Searchesback

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
Page 11: 卓越計劃進度報告 JNDI Java Naming and Directory Interface 網際網路實驗室 報告人 894346 潘燕弘

JNDI Overview(cont) The Directory Context

ndash getAttributes()

ndash modifyAttributes()

ndash Searchesback

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11