48
Chapter 5 Introduction to EJB
EJB Overview
EJBs provide an architecture for building distributed, component-based, enterprise-level
Java 2 Platform, Enterprise Edition (J2EE) applications. Enterprise JavaBeans
components, called
enterprise beans
, are scalable, transactional, and secure. EJBs written
using only features in the EJB specification are portable to other J2EE application
servers.
An enterprise bean is a body of code with fields to implement modules of business logic.
Enterprise beans are building blocks that you can use alone or with other enterprise beans
to execute business logic on a J2EE server.
Enterprise beans are hosted by an EJB container. In addition to standard container
services, an EJB container provides a range of transaction and persistence services, and
access to the J2EE service and communication application programming interfaces
(APIs). The EJB container handles the complexity of lower-level services, such as
component life cycle, state management, persistence, multithreading, connection
pooling, transaction management, and security.
For more information, see
“Container services” on page 49
.
An application server that supports EJBs lets Java developers concentrate on
implementing the business logic of an enterprise application as reusable components.
The EJB programming model is best suited for experienced server-side Java developers
who understand the EJB API. JRun simplifies EJB development by providing
functionality such as stubless, open-directory deployment, the Enterprise Deployment
Wizard, and XDoclet support. For information, see
“Using EJB in JRun” on page 52
.
The parts of an EJB
The following table describes the parts of an EJB:
For more information, see JRun Programmer’s Guide.
Part
Description
Home interface
Provides methods that control EJB lifecycle operations, including
creating, removing, and locating an EJB instance. There are two
types of home interfaces:
•
Remote home
Used by remote clients.
•
Local home
Used by clients running on the same JRun
server.
Component interface
Defines the business methods that are exposed to EJB clients.
There are two types of component interfaces:
•
Remote
Used by remote clients.
•
Local
Used by clients running on the same JRun server.
Bean implementation
Contains the methods that perform business logic. Also contains
callback methods that EJB developers implement as necessary.
Deployment
descriptor
Specifies the declarative semantics that describe an EJB and the
services it requires.
Содержание 38000382 - Macromedia JRun - Mac
Страница 1: ...Getting Started with JRun...
Страница 16: ......
Страница 68: ...54 Chapter 5 Introduction to EJB...
Страница 82: ......
Страница 110: ...96 Lesson 3 EJB Tutorial...
Страница 128: ...114 Lesson 4 Web Services Tutorial...
Страница 132: ...118 Index...