Bài giảng Lập trình mạng nâng cao: EJB: Stateful Session Bean - Nguyễn Xuân Vinh
Số trang: 23
Loại file: ppt
Dung lượng: 419.50 KB
Lượt xem: 19
Lượt tải: 0
Xem trước 3 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Learning objectives of this chapter include: Define a Stateful Session Bean, list the characteristics of a Stateful Session Bean, write Stateful session bean programs, differentiate between Stateless and Stateful Session beans.
Nội dung trích xuất từ tài liệu:
Bài giảng Lập trình mạng nâng cao: EJB: Stateful Session Bean - Nguyễn Xuân Vinh TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCMGV:NGUYỄNXUÂNVINHMÔN:LẬPTRÌNHMẠNG2 KHOACÔNGNGHỆTHÔNGTIN EJB: Stateful Session Bean15/01/16 Presenter:NguyễnXuânVinh InformationTechnologyFaculty/XX NongLamUniversity1 TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCM KHOACÔNGNGHỆTHÔNGTIN SessionObjectivesGV:NGUYỄNXUÂNVINH DefineaStatefulSessionBean ListthecharacteristicsofaStatefulSessionBean. WriteStatefulsessionbeanprograms. DifferentiatebetweenStatelessandStatefulSessionbeans.MÔN:LẬPTRÌNHMẠNG215/01/16/XX2 TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCM KHOACÔNGNGHỆTHÔNGTIN ReviewofSession3(1of3)GV:NGUYỄNXUÂNVINH Thebeanclass,theEJBobject,theremoteinterface,thehomeinterface,the homeobject,thedeploymentdescriptors,andthejarfilesconstitutethe enterprisebean. Beanclasscontainstheimplementationofthebusinesslogicmethods. EJBcontainerperformsimportantmanagementfunctionswhenitintercepts clientrequestssuchas: *TransactionlogicMÔN:LẬPTRÌNHMẠNG2 *Securitylogic *Beaninstancelogic TheRemoteinterfaceduplicatesthemethodsexposedbythebeanclass. ResponsibilitiesoftheEJBhomeobject: *CreatingEJBobjects *SearchingforexistingEJBObjects *RemovingEJBObjects15/01/16/XX3 TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCM KHOACÔNGNGHỆTHÔNGTIN ReviewofSession3(2of3)GV:NGUYỄNXUÂNVINH Thedeploymentdescriptor:AfilethattellstheEJBserverabout theclasses,thehomeinterface,andtheremoteinterfacethatMÔN:LẬPTRÌNHMẠNG2 formthebean. Thelifetimeofasessionbeanmaylasttillsuchtimeasthatofa clientsession.Itcouldbeaslongasawindowisopenoras longasanapplicationisopen.Sessionbeansdonot,therefore, surviveapplicationservercrashesormachinecrashes. Threeclassesareessentialfordeployment: HomeInterface15/01/16 RemoteInterface Beanclass/XX4 TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCM KHOACÔNGNGHỆTHÔNGTIN ReviewofSession3(3of3)GV:NGUYỄNXUÂNVINH Theejbjar.xmlfileisacompressedfilethatcontains thedeclarationsoftheenterprisebeanclass,theMÔN:LẬPTRÌNHMẠNG2 remoteinterfaceandthehomeinterface. AnEJBclientcanbe: *AnordinaryJavaBean *AnotherEJB *AJSPPage *Aservlet *Anapplet15/01/16 *Astandaloneapplication/XX5 CharacteristicsofStatefulSession TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCM KHOACÔNGNGHỆTHÔNGTIN BeansGV:NGUYỄNXUÂNVINH Conversionalstateoccurswhenaclientcallsamethodonabean. Poolinghastobedonetoconserveresourcesandenhancesscalability. Thecontainerswapsoutabeanandsavestheconversationalstateto theharddiskorotherstoragedevices.Thisprocessiscalled passivation.MÔN:LẬPTRÌNHMẠNG2 Whentheclientrequestsforamethod,thepassivatedconversational stateisreturnedtothebean.Thebeanisagainreadytomeetthe request.Thisprocessiscal ...
Nội dung trích xuất từ tài liệu:
Bài giảng Lập trình mạng nâng cao: EJB: Stateful Session Bean - Nguyễn Xuân Vinh TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCMGV:NGUYỄNXUÂNVINHMÔN:LẬPTRÌNHMẠNG2 KHOACÔNGNGHỆTHÔNGTIN EJB: Stateful Session Bean15/01/16 Presenter:NguyễnXuânVinh InformationTechnologyFaculty/XX NongLamUniversity1 TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCM KHOACÔNGNGHỆTHÔNGTIN SessionObjectivesGV:NGUYỄNXUÂNVINH DefineaStatefulSessionBean ListthecharacteristicsofaStatefulSessionBean. WriteStatefulsessionbeanprograms. DifferentiatebetweenStatelessandStatefulSessionbeans.MÔN:LẬPTRÌNHMẠNG215/01/16/XX2 TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCM KHOACÔNGNGHỆTHÔNGTIN ReviewofSession3(1of3)GV:NGUYỄNXUÂNVINH Thebeanclass,theEJBobject,theremoteinterface,thehomeinterface,the homeobject,thedeploymentdescriptors,andthejarfilesconstitutethe enterprisebean. Beanclasscontainstheimplementationofthebusinesslogicmethods. EJBcontainerperformsimportantmanagementfunctionswhenitintercepts clientrequestssuchas: *TransactionlogicMÔN:LẬPTRÌNHMẠNG2 *Securitylogic *Beaninstancelogic TheRemoteinterfaceduplicatesthemethodsexposedbythebeanclass. ResponsibilitiesoftheEJBhomeobject: *CreatingEJBobjects *SearchingforexistingEJBObjects *RemovingEJBObjects15/01/16/XX3 TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCM KHOACÔNGNGHỆTHÔNGTIN ReviewofSession3(2of3)GV:NGUYỄNXUÂNVINH Thedeploymentdescriptor:AfilethattellstheEJBserverabout theclasses,thehomeinterface,andtheremoteinterfacethatMÔN:LẬPTRÌNHMẠNG2 formthebean. Thelifetimeofasessionbeanmaylasttillsuchtimeasthatofa clientsession.Itcouldbeaslongasawindowisopenoras longasanapplicationisopen.Sessionbeansdonot,therefore, surviveapplicationservercrashesormachinecrashes. Threeclassesareessentialfordeployment: HomeInterface15/01/16 RemoteInterface Beanclass/XX4 TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCM KHOACÔNGNGHỆTHÔNGTIN ReviewofSession3(3of3)GV:NGUYỄNXUÂNVINH Theejbjar.xmlfileisacompressedfilethatcontains thedeclarationsoftheenterprisebeanclass,theMÔN:LẬPTRÌNHMẠNG2 remoteinterfaceandthehomeinterface. AnEJBclientcanbe: *AnordinaryJavaBean *AnotherEJB *AJSPPage *Aservlet *Anapplet15/01/16 *Astandaloneapplication/XX5 CharacteristicsofStatefulSession TRƯỜNGĐẠIHỌCNÔNGLÂMTP.HCM KHOACÔNGNGHỆTHÔNGTIN BeansGV:NGUYỄNXUÂNVINH Conversionalstateoccurswhenaclientcallsamethodonabean. Poolinghastobedonetoconserveresourcesandenhancesscalability. Thecontainerswapsoutabeanandsavestheconversationalstateto theharddiskorotherstoragedevices.Thisprocessiscalled passivation.MÔN:LẬPTRÌNHMẠNG2 Whentheclientrequestsforamethod,thepassivatedconversational stateisreturnedtothebean.Thebeanisagainreadytomeetthe request.Thisprocessiscal ...
Tìm kiếm theo từ khóa liên quan:
Lập trình mạng nâng cao Bài giảng Lập trình mạng nâng cao Lập trình mạng Stateful Session Bean Characteristics of Stateful Session BeansTài liệu có liên quan:
-
Đề cương chi tiết học phần: Mạng máy tính và lập trình mạng
4 trang 195 0 0 -
Báo cáo bài tập lớn môn Mạng máy tính và Lập trình mạng: Tìm hiểu về Soap
32 trang 139 0 0 -
349 trang 128 0 0
-
Bài giảng Lập trình mạng - Chương 1: Giới thiệu Lập trình mạng
18 trang 113 0 0 -
Báo cáo chuyên đề: Lập trình mạng nâng cao
24 trang 88 0 0 -
Giáo trình Lập trình mạng: Phần 1 - Trường Đại học Phan Thiết
78 trang 79 0 0 -
Giáo trình Lập trình mạng: Phần 1
54 trang 72 0 0 -
Giáo trình Lập trình mạng - ThS. Văn Thiên Hoàng
201 trang 60 0 0 -
17 trang 51 0 0
-
Tài liệu hệ thống phát hiện xâm nhập
14 trang 41 0 0