正在加载图片...
CHAPTER 1 INTRODUCTION TO THE EJB ARCHITECTURE Reusability EJBs are loosely coupled components.An EJB may be reused and packaged into multiple applications,though it must be bundled with,or have access to,the business interfaces of dependent EJBs Persistence Although no longer covered in th EJB spec,JPA entities are an essential complement to EJB.Entities are persistent byasngleovinthatiableidcnies.AaentiychsmapstoadatabaseabiEand objects enuty instance is represented Progression of the EJB Spec duced,it include s nev add or more importantly,sin e its firs ary of ho spec has progressec stcommercial implementations in1998 EJB 1.0 The initial release,1.0,be support for stateful and stateless rvice objects,called session beans;and optional rt fo sister ain obje and re ed the ng infra and pass-by-value sema antics. EJB 1.1 The follow-up release,1.1,mandated support among vendors for entity beans,and introduced the XMLdeployment descriptor to replace storing metadata in a special serialized class file. EJB 2.0 EJB 2.0 addressed the overhead and pass-by-value shortcomings of remote interfaces by introducing the local interface.Only clients running inside the J2EE container could access an EJB through its local interface,but pass-by-reference method calls allowed for more efficient interchanges between components.A new type of EJB was also introduced-the message-driven bean(MDB),which could participate in asynchronous messaging systems. Entity beans gained support for container-managed relationships(CMRs),allowing bean developers to declaratively specify persistent relationships between entity beans that were managed by the EJB container.Also,Enterprise JavaBeans Query Language(EJB QL)was introduced,which gave developers the ability to query entity bean instances using a language that resembled SQL. EJB 2.1 rvices,allov ngas sion b n to e an endpoint interfa and a timer service d EJBs to ejb-jar.xml ed EIB QL eployment descriptoChapter 1 ■ Introduction to the EJB Architecture 4 Reusability EJBs are loosely coupled components. An EJB may be reused and packaged into multiple applications, though it must be bundled with, or have access to, the business interfaces of dependent EJBs. Persistence Although no longer covered in the EJB spec, JPA entities are an essential complement to EJB. Entities are persistent domain objects with unique identities. An entity class maps to a database table, and each entity instance is represented by a single row in that table. Progression of the EJB Spec Each time a new version of the EJB spec is introduced, it includes new, significant features to address popular demand and adopt emerging technologies. Here is a brief summary of how the EJB spec has progressed since its birth in 1996, or more importantly, since its first commercial implementations in 1998. EJB 1.0 The initial release, 1.0, began with support for stateful and stateless service objects, called session beans; and optional support for persistent domain objects, called entity beans. For portability, EJBs were made accessible through a special remote interface that offered portability and remotability, but incurred the overhead of a remoting infrastructure and pass-by-value semantics. EJB 1.1 The follow-up release, 1.1, mandated support among vendors for entity beans, and introduced the XML deployment descriptor to replace storing metadata in a special serialized class file. EJB 2.0 EJB 2.0 addressed the overhead and pass-by-value shortcomings of remote interfaces by introducing the local interface. Only clients running inside the J2EE container could access an EJB through its local interface, but pass-by-reference method calls allowed for more efficient interchanges between components. A new type of EJB was also introduced—the message-driven bean (MDB), which could participate in asynchronous messaging systems. Entity beans gained support for container-managed relationships (CMRs), allowing bean developers to declaratively specify persistent relationships between entity beans that were managed by the EJB container. Also, Enterprise JavaBeans Query Language (EJB QL) was introduced, which gave developers the ability to query entity bean instances using a language that resembled SQL. EJB 2.1 EJB 2.1 added support for Web Services, allowing a session bean to expose an endpoint interface, and a timer service that allowed EJBs to be invoked at designated times or intervals. EJB 2.1 also provided expanded EJB QL functions, and an XML schema was introduced as a replacement for the DTD that defined the ejb-jar.xml deployment descriptor
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有