About Enterprise Beans
See Also
Written in the Java programming language, an enterprise bean is a server-side
component that encapsulates the business logic of an application. The business
logic is the code that fulfills the purpose of the application. In an inventory
control application, for example, the enterprise beans might implement the business
logic in methods called checkInventoryLevel and orderProduct.
By invoking these methods, remote clients can access the inventory services
provided by the application.
Enterprise beans provide the following advantages when developing large, distributed
applications:
- Because the EJB container provides system-level services to enterprise beans,
the bean developer can concentrate on solving business problems. The EJB container,
and not the bean developer, is responsible for system-level services such
as transaction management and security authorization.
- Because the beans, and not the clients, contain the application's business
logic, the client developer can focus on the presentation of the client. The
client developer does not have to code the routines that implement business
rules or access databases.
- Because enterprise beans are portable components, the application assembler
can build new applications from existing beans. These applications can run
on any compliant Java EE-compliant server provided that they use the standard APIs.
You can develop the following types of enterprise beans:
- Session Beans. Perform tasks
for a client and implement Web services.
- Entity Beans. In J2EE 1.4 applications, entity beans
are used to represent a business entity object that exists in persistent storage.
In Java EE applications, entities are used instead of entity beans.
For more about persistent entity objects, see Creating an Entity Class.
- Message-Driven Beans. Act
as listeners for the Java Message Service API, processing messages asynchronously.
- See Also
- Creating an EJB Module Project
- Creating an Enterprise Bean
- Defining a Business Method
- Building an EJB Module
- Deploying an EJB Module
Legal Notices