Enterprise JavaBeansTM Tutorial:
Building Your First Stateless Session Bean
by Tom Daly and Uday Shetty
About this Tutorial
The intention of this tutorial is to demonstrate how easy it is to build
server-side Java components using the Enterprise JavaBeans component model.
In fact, ease-of-use and ease-of-programming are key. It is designed to
enhance your understanding of the
Enterprise JavaBeans
Specification, and the Enterprise JavaBeans model by providing concrete
examples and step-by-step guidelines for building and using Enterprise
JavaBeans applications.
This tutorial shows you how to program Enterprise JavaBeans, and how to
install, or deploy, them in an Enterprise JavaBeans container.
Note: in Enterprise JavaBeans terminology the installation process is
called deployment. The Enterprise JavaBeans Container is provided
by the Enterprise JavaBeans server vendor, so is not something the programmer
has to worry too much about.
By following the eight steps, and working through the examples, you will
become familiar with the fundamental pieces of the Enterprise JavaBeans
model, and create the Enterprise JavaBeans version of the "Hello
World" program.
To get the most out of this tutorial you need to be familiar with at least
the basic concepts of the Enterprise JavaBeans programming model. Programmers
who are not familiar with Enterprise JavaBeans should refer to the
Java
Tutorial, and the white paper,
Enterprise
JavaBeans Technology.
About the Example
The example introduces a complete stateless session enterprise JavaBean
with source code for all the components. It is functionally equivalent
to the perennial "Hello World" program. It is the simplest of all
enterprise beans to write, and demonstrates the Enterprise JavaBeans model
with minimum complexity.
The example is built assuming access to the BEA Weblogic Enterprise
JavaBeans server, which is mainly for convenience as an evaluation version
of this server, and is available on the Web, (see Step 1
for BEA Weblogic download and installation instructions). The code
for the bean should work in any Enterprise JavaBeans-compliant container or
server. The only changes required should be in the deployment process and
perhaps the client code. The diagram below describes the architecture of the
DemoBean example and its client program.
To continue the tutorial, click here.