TAILIEUCHUNG - Design ejb design patterns phần 4

Điều tồi tệ là cách tiếp cận này sẽ không đảm bảo sự an toàn của tiền của khách hàng. Nếu có điều gì sai với tiền gửi, tiền của khách hàng đã bị thu hồi, và tiền của mình sẽ bị mất. Việc kiểm tra ủy quyền người sử dụng, thu hồi, và tiền gửi tất cả các chạy hoàn toàn riêng biệt, và nếu tiền gửi không thành công, thu hồi sẽ không được cuộn lại, kết quả trong một nhà nước không phù hợp. . | 64 Chapter Two Here the session bean will perform a JDBC call to get a ResultSet that contains information about an employee and his or her department. The session bean will then manually extract fields from the ResultSet and call the necessary setters to populate the DTO. Each row in the ResultSet will be transferred into a DTO which will be added to a collection. This collection of DTOs now forms a network-transportable bundle which can be transferred to the client for consumption. As explained in the Data Transfer HashMap pattern using DTOs as a data transport mechanism causes maintainability problems because of the often very large DTO layer that needs to be created as well as the fact that client UIs are tightly coupled to the DTO layer. When using JDBC for Reading DTOs suffer an additional problem Performance tabular to Object Oriented OO and back to tabular is redundant. With the data already represented in rows in tables in a result set the transferring of the data into a collection of objects and then back into a table on the client UI consisting of rows and columns is redundant. When using JDBC for Reading ideally a data transfer mechanism should be used that can preserve the tabular nature of the data being transferred in a generic fashion allowing for simpler clients and simpler parsing into the client UI. Therefore Use RowSets for marshalling raw relational data directly from a ResultSet in the EJB tier to the client tier. Introduced in as an optional API in JDBC is an interface a subinterface of RowSet joined the core JDBC API as of JDBC . What makes RowSets relevant to EJB developers is that particular implementations the RowSet interface allow you to wrap ResultSet data and marshal it off to the client tier where a client can operate directly on the rows and fields in a RowSet as they might on a Result Set. This allows developers to take tabular data directly out of the database and have them easily .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.