Chapter 4. Working with Session Beans

This chapter describes the typical programming style for applications using session beans, focusing on the essential information you need to use session beans in Web-based enterprise applications. The chapter describes a session bean from two points of view: the session bean developer, who implements a session bean; and the client application programmer, who uses the session bean.

Some sections discuss how the bean developer should implement the session bean methods, including the business methods, create methods, and the remove method. These sections also describe how the bean developer defines the home and component interfaces for a session bean.

The chapter also illustrates how the client creates and uses a session object. In particular, the chapter shows the client programmer how to use the session bean's home interface to create a session object and how to use the component interfaces either a local interface or a remote interface to invoke business methods on the session object. (Session objects are explained later in Section 5.1, Container Artifacts, on page 128.) Chapter 9 explains in detail the Web service client view for session beans.

The example application illustrated in this chapter uses only session beans. For simplicity, we assume that a single organization developed the application. Chapter 6, Using Message-Driven Beans and Connectors, shows an alternative way of constructing the example application using a message-driven bean. Chapter 8, Entity Bean Application Example, extends the example application to incorporate entity beans. Chapter 9, Using Enterprise JavaBeans in Web Services, illustrates how to use enterprise beans and Web services technology to integrate applications built by multiple organizations.



Applying Enterprise Javabeans
Applying Enterprise JavaBeans(TM): Component-Based Development for the J2EE(TM) Platform
ISBN: 0201702673
EAN: 2147483647
Year: 2003
Pages: 110

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net