An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
Objectives • Define the methods of the SessionBean interface • Describe the EJBContext and the SessionContext interfaces • Contrast stateful and stateless session beans • Explain how to write business methods for a session bean • Discuss the enterprise bean’s life cycle
Objectives (cont’d) • Create a session bean • Define the EJBHome and EJBObject interfaces and their methods • Discuss the superclass for the home and remote interfaces • Describe system and application exceptions • Deploy and connect to a session bean
Creating theEnterprise Bean Class • ejbCreate methods • The SessionBean interface • The EJBContext interface • The SessionContext interface
Stateless andStateful Session Beans • Stateless session beans • Do not keep track of any information from one method call to the next • Stateful session beans • Can change their state during a conversation with a client
Example:A Session Bean • The Teller bean class • The Teller remote interface • The Teller home interface
The LibraryApplication • The Book entity bean • The Patron entity bean • The CheckOutRecord entity bean • The CheckOut session bean • The CheckIn session bean
Introduction toEJB Deployment • The deployment descriptor • DD XML tags • Environment data • Environment property XML tags • Accessing environment data • Using bean references • EJB reference XML tags • Using the EJB reference • Using resource factories • Factory resource XML tags
AdditionalDeployment Concepts • Assembler/deployer roles with the deployment descriptor • EJB deployment in an EJB server
Summary • Define the methods of the SessionBean interface • Describe the EJBContext and the SessionContext interfaces • Contrast stateful and stateless session beans • Explain how to write business methods for a session bean • Discuss the enterprise bean’s life cycle
Summary (cont’d) • Create a session bean • Define the EJBHome and EJBObject interfaces and their methods • Discuss the superclass for the home and remote interfaces • Describe system and application exceptions • Deploy and connect to a session bean
Objectives • Discuss entity beans and their persistence management techniques • Identify the methods of the EntityBean and EntityContext interfaces • Define primary keys and their use • Describe the mechanics involved in entity beans • Use finder methods • Write an entity bean and its required interfaces
What Is an Entity Bean? • The EntityBean interface • The EntityContext interface • Primary keys
Entity BeanArchitecture • Creating entity beans • Invoking business methods on entity beans • Swapping entity beans • Invoking remove( ) on an entity bean • Life cycle of an entity bean instance