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 package, developers can create,
assemble, and deploy components that conform to the EJB
specification.
The original JavaBeans is also a component model, but it’s not a server-side component model like EJB. Other than sharing the name “JavaBeans,” these two component models are completely unrelated. In the past, a lot of the literature referred to EJB as an extension of the original JavaBeans, but this is a misrepresentation. The two APIs serve very different purposes, and EJB does not extend or use the original JavaBeans component model.
JavaBeans is intended to be used for intraprocess purposes, while EJB is designed for inter process components. In other words, the original JavaBeans was not intended for distributed components. JavaBeans can be used to solve a variety of problems, but it is primarily used to build clients by assembling visual (GUI) and nonvisual widgets. It’s an excellent component model, possibly the best one ever devised for intraprocess development, but it’s not a server-side component model. EJB, on the other hand, is explicitly designed to address issues involved with managing distributed business objects in a three-tier architecture.
Given that JavaBeans and Enterprise JavaBeans are completely different, why are they both called component models? In this context, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access