1. Trang chủ
  2. » Giáo án - Bài giảng

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

50 833 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 50
Dung lượng 859,5 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

 Discuss Component Architecture Describe Distributed Object Architecture  Discuss RMI  Explain RMI-IIOP  Discuss the Java Naming and Directory Interface...  Components are building

Trang 3

 Discuss Component Architecture

 Describe Distributed Object Architecture

 Discuss RMI

 Explain RMI-IIOP

 Discuss the Java Naming and Directory Interface

Trang 4

 Components are building blocks of an application

 Provides a set of services or functions, such that it

can easily interact with other applications or 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

Trang 5

Evolution of Enterprise JavaBeans

 EJB was developed so that it would:

* Specialize in handling the business logic of

an application

* Be robust

* Be secure so that it cannot be tampered

 EJB Component has been designed to

encapsulate business logic

Trang 7

 Unmarshalling - reverse process of converting the

byte-stream back to the original data or objects

Trang 8

R E M O T E R E G I S T R Y

Trang 9

 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

Responsible for unicast point-to-point method

invocation

 Transport Layer

Uses TCP/IP for communication

Trang 10

Client

Transport Layer

Server

TCP Protocol UDP Protocol

Sockets

Trang 11

Database of Objects

SERVER

Trang 12

RMI (Java only)

RMI-IIOP (Java)

RMI-IIOP (Java)

CORBA (Any Language)

CORBA (Any Language)

JRMP JRMP

IIOP

IIOP

Trang 13

Java Naming and Directory Interface

 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.

 Bridges the gap between directory services and makes it possible for the developer to write portable naming and directory services

Trang 14

NDS Service Provider

RMI Application

Service Provider Interface

CORBA

Application

Trang 15

Naming Concepts in JNDI

Compound

CompositeAtomic

The three types of names in JNDI

Trang 16

Looking up the Component/Object

Creating the Initial Context Importing the JNDI classes

Catching the Naming Exception

Running the program Compiling the Program

Trang 17

 When the initial context is acquired, all information

pertaining to this must be provided to JNDI

 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

Trang 19

Java 2 Platform Enterprise Edition ( J2EE )

 J2EE Technologies

* Enterprise Java Beans (EJB)

* 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)

(cont…)

Trang 21

New Features in EJB 2.0

 Container-Managed Persistence

 Container-Managed Relationships

 Message-Driven Beans

 Local Interface

 Additional Methods on the Home-Interface

 New Query Language (EJB QL)

Trang 22

* Programming business logic

* Relying on backend services

* Providing user interaction using client-side applications

 A software component is an individual unit of

composition with no persistent state

 A software component can be deployed

independently, and is subject to composition by third parties.

Trang 23

In a distributed application, processing is distributed

across multiple networked computers.

 The J2EE Platform collects all the Enterprise APIs to

form a total development platform that distributes object architectures.

Trang 24

 JNDI is used by Enterprise JavaBeans to perform a

look-up to distribute objects in a network.

 The point where all naming and directory operations are first performed is called the Initial Context Factory.

Trang 25

Architectural Overview of EJB

Session 2

Trang 26

Enterprise JavaBeans

Container

Trang 27

In session 1, we did the following:

 Discussed Component Architecture

 Described Distributed Object Architecture

 Discussed RMI

 Explained RMI-IIOP

 Discussed the Java Naming and Directory Interface

Trang 28

Grouping of resuable modules

vendors These servers are

needed to run the

components

Trang 29

Parties Involved in EJB Deployment

Bean Provider

Parties in EJB Deployment

Container Provider The Deployer

Server Provider Application

System Administrator

Supplies Application server

Deploys prewritten components

Monitors functioning

EJB Cont/ Server

Trang 30

Remote Interface

Trang 31

The EJB Container

THE SERVER

THE EJB CONTAINER

THE CLIENT Outside World

The container which resides insides the server acts as a BUFFER

Connects clients to the Beans

Managing Life-cycle of a Bean

Trang 33

The Application Assembler and EJB Deployer

Assembled application

EJB Deployer

Operational

Environments

Application Assembler

Server Side

Client Side

Trang 37

Support for Management of Multiple Instances

Instance

Passivation

Instance pooling

In order to perform timely servicing to the client the container performs a variety of tasks

Server Tasks

Database connection pooling

Trang 38

The Enterprise Java Bean is a server-side component that is employed on

a distributed multi-tier environment

Trang 39

Features of an EJB Container

Trang 40

 Management of resources enhances the scalability of a multi-tier architecture.

 The container provides resource- management services for resources such as:

Threads

Socket Connections

Database Connections

Trang 41

in a sitePage 2

User takes time

as he reads the contents in the page

Client

Container is used for another process while user takes time

to read

Trang 42

Executed as one unit

of work

Multiple usersuse the same data

Trang 43

Transactions-Two phase commit protocol

Transaction

Coordinator

Database 1

Database 3Database 2Prepare Phase

Prepare message

Commit Phase

Commit/Rollback Transaction Request

All databases issue

Records results

of transaction

Trang 44

Deployed across multiple tiers

Networked after deployment Not-Networked

Trang 45

local or remote

Trang 47

* Vendor grouping of product into modules

* Running of the EJB component on multi-tier applications

* Combining the component into a workflow, and integrating the business logic

* Deploying and distributing the system over multiple systems across the network

 Six parties involved while deploying Enterprise JavaBeans:

* The Bean provider * The Container provider

* The Server provider * The Application Assembler

* The Deployer * The System Administrator

Trang 48

 The main responsibilities of the container are:

* Connecting clients to the beans

* Managing the life cycle of the bean

 The server provides the container with network connectivity

Trang 49

* Support for management of multiple instances

 An Enterprise Java Bean can be classified into:

* Session Beans

* Entity Beans

* Message-Driven Beans

Ngày đăng: 28/05/2015, 07:54

TỪ KHÓA LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm