1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Transaction & Security ppt

22 195 0
Tài liệu đã được kiểm tra trùng lặp

Đ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

Tiêu đề Transaction & Security
Tác giả Nguyễn Văn Lành
Chuyên ngành Lập trình Java & J2EE
Thể loại Chuyên đề
Định dạng
Số trang 22
Dung lượng 6,06 MB

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

Nội dung

Transaction & SecurityChuyên đề Lập trình Java & J2EE Chương 16 Biên soạn: Th.S Nguyễn văn Lành... Motivation for Transactions Atomic Operations  Recovery after Network or Machine Fail

Trang 1

Transaction & Security

Chuyên đề Lập trình Java & J2EE

Chương 16

Biên soạn: Th.S Nguyễn văn Lành

Trang 2

Motivation for Transactions

 Atomic Operations

 Recovery after Network or Machine Failure

 Multiple Users Sharing Data

 avoid those problems by properly using

Trang 3

The ACID Properties

Atomicity guarantees that many operations are

bundled together and appear as one contiguous unit

of work

Consistency guarantees that a transaction leaves

the system’s state to be consistent after a

transaction completes

Isolation protects concurrently executing

transactions from seeing each other’s incomplete

results

Durability guarantees that updates to managed

resources, such as database records, survive failures

Trang 4

Transactional Models

Flat transaction is a series of

operations that are performed

atomically as a single unit of work

Nested transaction allows to embed atomic units of work within other units

of work.

Trang 8

Required

Trang 9

Requires New

Trang 10

Mandatory

Trang 11

Never

Trang 12

Bean Managed Transaction

Trang 14

Java Transaction API (JTA)

 JTA can be used in client & bean code

to programmatically control

transactional boundaries.

 The interface you use to

programmatically control transactions is

Trang 15

UserTransaction interface

Trang 16

Code sample

Trang 17

Transactional Isolation

Concurrency Control

 locking on the database to prevent the two components

from reading data

Four transaction isolation levels:

Trang 18

Distributed Transactions

 Distributed flat transactions allow multiple

transaction participants, written by different vendors , to collaborate under one

transactional context.

Two-Phase Commit Protocol

Phase One begins by sending a before commit

message to all resources involved in the transaction

Phase Two occurs only if Phase One completed

Trang 19

2PC protocol

Trang 20

EJB Security

Authentication verifies that the client

is who he claims to be.

Authorization checks to see if an

already authenticated client is allowed

to perform a task.

Trang 21

Basic authentication

 The Web client supplies a username and password

to the Web server

Form-based authentication.

 uses a customizable form, login screen

Digest authentication

 Web client supplies a special message digest to

the Web server

Certificate authentication

 The client can establish an identity with X.509

Ngày đăng: 25/01/2014, 11:20

TỪ KHÓA LIÊN QUAN

w