Distributed Objects   «Prev  Next»

Lesson 2Enterprise JavaBeans versus JavaBeans
Objective Identify differences between Enterprise JavaBeans & JavaBeans.

What are the differences between Enterprise JavaBeans and JavaBeans?

The only similarity between Enterprise JavaBeans and JavaBeans is that they are both component models, and they are both called "beans". In addition, JavaBeans is associated with the J2SE and Enterprise JavaBeans are associated with J2EE.

Enterprise JavaBeans

Enterprise JavaBeans have the following properties:
  1. They are components and provide services through an interface to clients.
  2. Their clients are separate programs that communicate with them over a network.
  3. They are designed to be remote objects in distributed applications.
  4. They exist on the second or third tier in multi-tier architectures.
  5. They are created, managed and executed independently within their container.
  6. They can be part of a transaction.
  7. They can be customized at deployment time by editing their environment properties.
  8. They can use only the services defined in the EJB specification.
  9. They can be assembled into applications without requiring source code changes or recompilation of the bean.

JavaBeans

  1. They are components that have an interface and provide a service through that interface.
  2. They exist, almost exclusively, as part of client-side, tier one programs.
  3. The services they provide are provided for another part of the same program.
  4. They can be combined into programs with other JavaBeans and specific code using a builder tool. [1]
In this course, when I refer to a bean, I will mean an EJB, not a client-side JavaBean.
In the next lesson, EJB clients, servers, containers, and beans will be discussed.

[1]Builder tool: A tool that allows the combining of client side JavaBeans into sophisticated applications with little or no programming.