Component Models
The term “component model”
has many different interpretations. Enterprise JavaBeans specifies a
server-side component model. Using a set of
classes and interfaces from the javax.ejb
packages, developers can create, assemble, and deploy components that
conform to the EJB specification.
The original JavaBeans™, the
java.beans package in the core Java API, is also a
component model, but it’s not a server-side component model
like EJB. In fact, other than sharing the name
“JavaBeans,” these two component models are completely
unrelated. A lot of the literature has referred to EJB as an
extension of the original JavaBeans, but this is a misrepresentation.
Other than the shared name, and the fact that they are both Java
component models, the two APIs serve very different purposes. EJB
does not extend or use the original JavaBeans component model.
The original JavaBeans (the java.beans package) is
intended to be used for intraprocess purposes,
while EJB (the javax.ejb package) is designed to
be used for interprocess components. In other
words, the original JavaBeans was not intended for distributed
components. JavaBeans can be used to solve a variety of problems, but
is primarily used to build
clients by assembling visual (GUI) and
nonvisual widgets. It’s an excellent component model, possibly
the best component model for intraprocess development ever devised, but it’s not a server-side component model. EJB is designed to address issues involved with managing distributed ...