正在加载图片...
CHAPTER 1 INTRODUCTION TO THE EJB ARCHITECTURE The Enterprise Bean Provider The Enterprise Bean Provider,also known as the Bean Provider,has the onsibility of defining and implementing the bu ss logic and structure of an ente se bean.This includes def the lav thods,specifying transactional and security information declaratively on the be n and its methods,injection or lookup of re uired resources and anything else that can he anplied to the enternrise hean class Applied to JPA entities,the Bean Provider defines the persistent structure of the entity and its relationships with other entities.The provider may define mapping and primary key-generation behavior,but this role is generally limited to defining the logical dependencies and structure of the entity. The Application Assembler The Application As mbler combines EJBs into EJB modules and enti bines th r Jav modu s to pr n.This t olving the inte metadata d efin fo g re entty components :h ut need not The Deployer The Deployer takes an application that has been assembled by the Application Assembler and deploys it to a particular application server instance or cluster.The Deployer must resolve all of the external dependencies defined by the EJB component,mapping them to concrete resources installed in the application server environment.In the case of entities,the Deployer may provide or override the details of the live database objects to which the entities will map. How This Book Is Organized of each chapter.There is mple pro mpand thu ey may b ha toa term or c pt that is not defined in tha o that i was defined in an earlier ch apter of the book. Chapter 1:Introduction to the EJB 3 Architecture This chapter opens by introducing the book and offering an orientation to EJB.This orientation covers the EJB develonment framework and com oonent model,the core features of EJB,the history of EJB,the EJB 3 simplified development model,and the EJB distributed comp ting model.The chapter concludes with a"Getting Started" section to help you install the NetBeans IDE and GlassFish Java EE reference implementation server required to run the many sample applications provided with this book. Chapter 2:EJB Session Beans Chapter2 explores EJB's primary service object:the session bean.Session beans are examined in their many roles: as entity facades,as service components-both with and without state,as singleton or timer-driven objects,and as the primary orchestrators of transaction and security services. 8Chapter 1 ■ Introduction to the EJB Architecture 8 The Enterprise Bean Provider The Enterprise Bean Provider, also known as the Bean Provider, has the responsibility of defining and implementing the business logic and structure of an enterprise bean. This includes defining the Java class, implementing service methods, specifying transactional and security information declaratively on the bean and its methods, injection or lookup of required resources, and anything else that can be applied to the enterprise bean class. Applied to JPA entities, the Bean Provider defines the persistent structure of the entity and its relationships with other entities. The provider may define mapping and primary key–generation behavior, but this role is generally limited to defining the logical dependencies and structure of the entity. The Application Assembler The Application Assembler combines EJBs into EJB modules and entities into persistence archives, and then it combines these modules together with other Java EE modules to produce an application. This task requires resolving references to logical server resources including references between EJBs. The Application Assembler must work with the interfaces and metadata defined for the EJB and entity components but need not be familiar with the implementation details. The Deployer The Deployer takes an application that has been assembled by the Application Assembler and deploys it to a particular application server instance or cluster. The Deployer must resolve all of the external dependencies defined by the EJB component, mapping them to concrete resources installed in the application server environment. In the case of entities, the Deployer may provide or override the details of the live database objects to which the entities will map. How This Book Is Organized To orient you to the structure of the remainder of this book, here is a brief summary of each chapter. There is no requirement that you read these chapters in order. Sample programs accompany each chapter, and they may be run independently of one another. Topics are introduced progressively, though, and thus if you find a reference in one chapter to a term or concept that is not defined in that chapter, chances are that it was defined in an earlier chapter of the book. Chapter 1: Introduction to the EJB 3 Architecture This chapter opens by introducing the book and offering an orientation to EJB. This orientation covers the EJB development framework and component model, the core features of EJB, the history of EJB, the EJB 3 simplified development model, and the EJB distributed computing model. The chapter concludes with a “Getting Started” section to help you install the NetBeans IDE and GlassFish Java EE reference implementation server required to run the many sample applications provided with this book. Chapter 2: EJB Session Beans Chapter 2 explores EJB’s primary service object: the session bean. Session beans are examined in their many roles: as entity facades, as service components—both with and without state, as singleton or timer-driven objects, and as the primary orchestrators of transaction and security services
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有