2. Using the Tutorial Examples 3. Getting Started with Web Applications 5. JavaServer Pages Technology 7. JavaServer Pages Standard Tag Library 10. JavaServer Faces Technology 11. Using JavaServer Faces Technology in JSP Pages 12. Developing with JavaServer Faces Technology 13. Creating Custom UI Components 14. Configuring JavaServer Faces Applications 15. Internationalizing and Localizing Web Applications 16. Building Web Services with JAX-WS 17. Binding between XML Schema and Java Classes 19. SOAP with Attachments API for Java What Is a Message-Driven Bean? What Makes Message-Driven Beans Different from Session Beans? When to Use Message-Driven Beans Defining Client Access with Interfaces Deciding on Remote or Local Access The Contents of an Enterprise Bean Naming Conventions for Enterprise Beans The Life Cycles of Enterprise Beans The Life Cycle of a Stateful Session Bean The Life Cycle of a Stateless Session Bean The Life Cycle of a Message-Driven Bean Further Information about Enterprise Beans 21. Getting Started with Enterprise Beans 23. A Message-Driven Bean Example 24. Introduction to the Java Persistence API 25. Persistence in the Web Tier 26. Persistence in the EJB Tier 27. The Java Persistence Query Language 28. Introduction to Security in the Java EE Platform 29. Securing Java EE Applications 31. The Java Message Service API 32. Java EE Examples Using the JMS API 36. The Coffee Break Application | What Is an Enterprise Bean?Written in the Java programming language, anenterprise bean is a server-side componentthat encapsulates the business logic of an application. The business logic is thecode that fulfills the purpose of the application. In an inventory control application,for example, the enterprise beans might implement the business logic in methods calledcheckInventoryLevel andorderProduct. By invoking these methods, clients can access the inventory servicesprovided by the application. Benefits of Enterprise BeansFor several reasons, enterprise beans simplify the development of large, distributed applications. First,because the EJB container provides system-level services to enterprise beans, the bean developercan concentrate on solving business problems. The EJB container, rather than the beandeveloper, is responsible for system-level services such as transaction management and security authorization. Second, because the beans rather than the clients contain the application’s business logic, theclient developer can focus on the presentation of the client. The client developerdoes not have to code the routines that implement business rules or accessdatabases. As a result, the clients are thinner, a benefit that is particularlyimportant for clients that run on small devices. Third, because enterprise beans are portable components, the application assembler can build newapplications from existing beans. These applications can run on any compliant Java EEserver provided that they use the standard APIs. When to Use Enterprise BeansYou should consider using enterprise beans if your application has any of thefollowing requirements:
Types of Enterprise BeansTable 20-1 summarizes the two types of enterprise beans. The following sections discuss eachtype in more detail. Table 20-1 Enterprise Bean Types Note -Entity beans have been replaced by Java Persistence API entities. For information aboutentities, seeChapter 24, Introduction to the Java Persistence API. Copyright © 2010, Oracle and/or its affiliates. All rights reserved.Legal Notices |