TAILIEUCHUNG - Building Java Enterprise Applications Volume I: Architecture phần 3

Tham khảo tài liệu 'building java enterprise applications volume i: architecture phần 3', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Building Java Enterprise Applications Volume I Architecture Example 4-1. The EntityAdapter Helper Class package import import public class EntityAdapter implements EntityBean protected EntityContext entityContext public void ejbActivate public void ejbPassivate public void ejbLoad public void ejbStore public void ejbRemove public void setEntityContext EntityContext entityContext entityContext public void unsetEntityContext entityContext null public EntityContext getEntityContext return entityContext If you have any implementation classes that need to provide special behavior for a callback you can override the adapter class overriding still allows you to leave out any callbacks that are not implemented keeping code clean. In addition I ve introduced the package in this class. All the entity beans created for the example can be put into this base package in a subpackage using the bean s name for example office or user with the EntityAdapter class in the util subpackage of the same structure. So entity and session beans end up prefaced with or . This is the same naming scheme you ll see in Sun s PetStore and most other enterprise applications. In addition to package naming I follow standard practices for the actual bean class names. This entails using the actual name of the data object as the name of an entity bean s remote interface. In the case of an office the interface name simply becomes Office. The home interface has Home appended to it resulting in OfficeHome and the bean implementation itself gets the word Bean added to it resulting in OfficeBean. And with this last detail covered you re ready to move to the bean code for the office classes. 59 Building Java Enterprise Applications Volume I Architecture The Remote Interface Once the naming has been determined it is simple to code the .

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.