Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Teach Yourself J2EE in 21 Days phần 3
Đang chuẩn bị liên kết để tải về tài liệu:
Teach Yourself J2EE in 21 Days phần 3
Ðông Tuyền
42
113
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Hôm qua, bạn thấy làm thế nào để sử dụng JNDI để có được một tham chiếu đến một ngôi nhà đậu kỳ họp và làm thế nào để có được một hạt đậu kỳ họp bằng cách gọi phương pháp tạo ra thích hợp (). Bây giờ bạn có một sự hiểu biết đầy đủ của đậu phiên làm việc như thế nào, có một vài điểm khác có giá trị đánh giá cao. | Session EJBs 201 Client s View Yesterday you saw how to use JNDI to obtain a reference to a Session bean home and how to obtain a Session bean by calling the appropriate createO method. Now that you have a full understanding of how Session beans work there are a few other points that are worth appreciating. First if your client has a reference to a stateless Session bean although it should call remove when it is finished with the EJB this method call doesn t actually do particularly much. In particular it won t release any bean resources itself as shown clearly by the state chart diagrams in Figure 5.3. What this will do is allow the EJB container to remove the EJBObject proxy for the bean. Conversely calling create for a stateless Session bean doesn t necessarily cause ejbCreate to be called on the underlying bean although the client will have a reference to an EJBObject after making this call. One benefit of stateless beans over stateful is that they are more resilient. That is if the client invokes a method on a stateless bean and it throws an exception the client can still use their reference to try again. The client does not need to discard the reference and obtain a new one from the home interface. This is because behind the scene the EJB container will have discarded the bean that threw the exception but can simply select another bean from the pool to service the client s retry attempt. This is safe to do because the stateless Session beans have no state. Of course it is possible that the retry attempt might fail it would depend on the underlying cause of the exception. In contrast if a stateful Session bean throws an exception the client must obtain a new Session bean reference and start its conversation over again. This is because the EJB container will have discarded the Session bean that threw the exception discarding all the client s conversational state in the process. Sometimes a client may end up having two references to a Session bean. It may have .
TÀI LIỆU LIÊN QUAN
Sams Teach Yourself PHP, MySQL and Apache
Sams Teach Yourself SAP 24 Hours
Sams Teach Yourself C in 21 Days - Fourth Edition
SAMS Teach Yourself Programming with Java in 24 Hours
Sams Teach Yourself Microsoft® Expression Web 4 Second Edition
Sams Teach Yourself C++ in One Hour a Day
Sams Teach Yourself PHP, MySQL and Apache All in One 5th Edition
Sams Teach Yourself Visual C# 2010 in 24 Hours
Sams Teach Yourself SQL in 24 Hours (5th Edition)
Sams Teach Yourself SQL in 24 Hours, Fourth Edition
crossorigin="anonymous">
Đã 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.