1、外文原文 CHAPTER 3 Introduction to Session Beans In this chapter, well take our first look at enterprise bean development concepts This chapter covers the following topics:1. What an enterprise bean component is composed of, including the enterprisebean class, the remote interface, the EJB object, the h
2、ome interface, thehome object, the deployment descriptor, the manifest, and the Ejb-jar file 2. The characteristics of session beans. Well see what makes session beansunique, and well introduce the differences between stateful and statelesssession beans 3. The rules for writing session bean classes
3、4. How to write client code to call session beans This chapter lays the necessary conceptual framework for you to begin EJBprogramming. Well see complete code examples in Chapters 4, 5, and 6 3.1 What Constitutes an Enterprise Bean? Enterprise beans are distributed, deployable server-side components
4、 that canbe assembled into larger applications. Enterprise beans can be partitioned across multiple tiers, can be transactional, can be multiuser secure, and can be deployedin any EJB-compatible container/server product Enterprise beans currently have two flavors: session beans and entity beans Sess
5、ion beans represent a business process, whereas entity beans representpermanent business data. Sun Microsystems may introduce other bean typesin the future as well This section examines exactly what constitutes an enterprise bean. As we willsee, an enterprise bean component is not a single monolothi
6、c filea numberof files work together to make up an enterprise bean 3.1.1 The Enterprise Bean ClassIn Part I, we learned that the Enterprise JavaBeans specification defines thecontracts between the different parties involved in a deployment. In order for abean to work in any container, and to work with any client of that bean, the beanmust adhere to a well-defined interface. In EJB, you provide your enterprise beancomponent implementation in an enterprise bean class. This is simply a Javacl