intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Bài giảng Lập trình mạng: Title - GV. Nguyễn Xuân Vinh

Chia sẻ: Xaydung K23 | Ngày: | Loại File: PPT | Số trang:50

50
lượt xem
6
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Session Objectives: discuss component, architecture, describe distributed object architecture, discuss RMI, explain RMI-IIOP, discuss the Java Naming and directory interface.

Chủ đề:
Lưu

Nội dung Text: Bài giảng Lập trình mạng: Title - GV. Nguyễn Xuân Vinh

  1. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM GV: NGUYỄN XUÂN VINH MÔN: LẬP TRÌNH MẠNG 2 KHOA CÔNG NGHỆ THÔNG TIN TITLE 27/10/14 Presenter: Nguyễn Xuân Vinh Information Technology Faculty /XX Nong Lam University 1
  2. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM GV: NGUYỄN XUÂN VINH MÔN: LẬP TRÌNH MẠNG 2 KHOA CÔNG NGHỆ THÔNG TIN Session 1 Introduction to Enterprise Java Beans 27/10/14 /XX 2
  3. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM GV: NGUYỄN XUÂN VINH KHOA CÔNG NGHỆ THÔNG TIN Session Objectives  Discuss Component Architecture  Describe Distributed Object Architecture MÔN: LẬP TRÌNH MẠNG 2  Discuss RMI  Explain RMI-IIOP  Discuss the Java Naming and Directory Interface 27/10/14 /XX 3
  4. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM GV: NGUYỄN XUÂN VINH KHOA CÔNG NGHỆ THÔNG TIN Component Architecture  Components are building blocks of an application   Provides a set of services or functions, such that it  can easily interact with other applications or  MÔN: LẬP TRÌNH MẠNG 2 components   Consists mainly of Web components, business logic  components, and service components.   Web components consist mainly of JSP and Servlets,  the business logic component consists of EJB and  the services component primarily consists of  JavaMail, JNDI, JMS, JTS, JDBC, and RMI­IIOP.  27/10/14 /XX 4
  5. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Evolution of Enterprise JavaBeans GV: NGUYỄN XUÂN VINH  EJB was developed so that it would:    * Specialize in handling the business logic of  an application MÔN: LẬP TRÌNH MẠNG 2               * Be robust               * Be secure so that it cannot be tampered.  EJB Component has been designed to  encapsulate business logic.  27/10/14 /XX 5
  6. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Distributed Object Architecture GV: NGUYỄN XUÂN VINH MÔN: LẬP TRÌNH MẠNG 2 27/10/14 /XX 6
  7. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM GV: NGUYỄN XUÂN VINH KHOA CÔNG NGHỆ THÔNG TIN RMI Architecture  RMI Application consists of            * Server              * Client MÔN: LẬP TRÌNH MẠNG 2  RMI defines two types of objects              * Stubs              * Skeletons  Marshalling ­ process of converting data or objects  into a byte­stream . 27/10/14  Unmarshalling ­ reverse process of converting the  byte­stream back to the original data or objects.  /XX 7
  8. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN RMI Layered Architecture GV: NGUYỄN XUÂN VINH Client Server MÔN: LẬP TRÌNH MẠNG 2 Object A Object B Object A Object B R E Object A Stub Object B M Skeleton O T E R E G I Remote Reference Layer Remote Reference Layer S 27/10/14 T R Y Transport Layer Transport Layer /XX 8
  9. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN RMI Layers GV: NGUYỄN XUÂN VINH  Stub and the Skeleton Layer The stub forwards the request from the client to the remote reference layer and then to the skeleton through transport layer.  Remote Reference Layer MÔN: LẬP TRÌNH MẠNG 2 Responsible for unicast point-to-point method invocation.  Transport Layer Uses TCP/IP for communication. 27/10/14 /XX 9
  10. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN The Transport Layer GV: NGUYỄN XUÂN VINH Client Server Transp Transp ort ort Layer Layer MÔN: LẬP TRÌNH MẠNG 2 Sockets 27/10/14 TCP Protocol UDP Protocol /XX 10
  11. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Remote Registry GV: NGUYỄN XUÂN VINH SERVER MÔN: LẬP TRÌNH MẠNG 2 Registers Remote Registry 27/10/14 Database of Objects /XX 11
  12. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN RMI over IIOP GV: NGUYỄN XUÂN VINH Client JRMP Server RMI RMI (Java only) JRMP (Java only) MÔN: LẬP TRÌNH MẠNG 2 Client Server RMI-IIOP RMI-IIOP (Java) (Java) IIOP Client Server CORBA IIOP CORBA 27/10/14 (Any Language) (Any Language) /XX 12
  13. Java Naming and Directory TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Interface GV: NGUYỄN XUÂN VINH  Java Naming and Directory Interface provides the naming and directory functionality to Java applications.  Provides a standard interface to locate the components, users,networks, and services placed across the network. MÔN: LẬP TRÌNH MẠNG 2  Bridges the gap between directory services and makes it possible for the developer to write portable naming and directory services 27/10/14 /XX 13
  14. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN The JNDI Architecture GV: NGUYỄN XUÂN VINH Client MÔN: LẬP TRÌNH MẠNG 2 JNDI Service Provider Interface 27/10/14 CORBA LDAP Service NDS Service RMI /XX Application Provider Provider Application 14
  15. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Naming Concepts in JNDI GV: NGUYỄN XUÂN VINH The three types of names in JNDI MÔN: LẬP TRÌNH MẠNG 2 nd Compou Atomic 27/10/14 ite Compos /XX 15
  16. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Steps in JNDI Programming GV: NGUYỄN XUÂN VINH Importing the JNDI classes Creating the Initial Context MÔN: LẬP TRÌNH MẠNG 2 Catching the Naming Exception Looking up the Component/Object 27/10/14 Compiling the Program Running the program /XX 16
  17. Initial Context Factory and the TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Directory Context GV: NGUYỄN XUÂN VINH  Initial Context Factory is the point where all naming and directory operations are first performed.  When the initial context is acquired, all information pertaining to this must be provided to JNDI. MÔN: LẬP TRÌNH MẠNG 2  The directory context or directory object is another type of context. It is used to define methods for inspecting and modifying attributes associated with a directory object. 27/10/14 /XX 17
  18. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Initial Context Factory and the GV: NGUYỄN XUÂN VINH Directory Context Binding MÔN: LẬP TRÌNH MẠNG 2 Initial Context Context Naming System Factory 27/10/14 Initial Context /XX Context 18
  19. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Java 2 Platform Enterprise Edition ( J2EE ) GV: NGUYỄN XUÂN VINH       J2EE Technologies     * Enterprise Java Beans (EJB) MÔN: LẬP TRÌNH MẠNG 2     * Remote Method Invocation (RMI)     * Java Naming and Directory Interface (JNDI)     * Java Database Connectivity (JDBC)     * Java Transaction API (JTA) and Java Transaction                Service (JTS)     * Java Messaging Service (JMS) 27/10/14                                                                                         (cont…) /XX 19
  20. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM GV: NGUYỄN XUÂN VINH KHOA CÔNG NGHỆ THÔNG TIN Java 2 Platform Enterprise Edition (J2EE)  J2EE Technologies * Java Servlets and Java Server Pages (JSP) MÔN: LẬP TRÌNH MẠNG 2 * Java IDL * Java Mail * Connectors * Extensible Markup Language (XML) 27/10/14 /XX 20
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2