Jul 18, 2004 12:27 PM
3101 Views
(Updated Jul 18, 2004 12:27 PM)
JavaBeans and Enterprise JavaBeans:
I hope this discussion will prove useful for beginers who aim at gaining knowledge in Java and its advanced concepts.
We will be discussing only the basic concepts of Java Beans and Enterprise Java Beans(EJB).
A common misconception is that an Enterprise JavaBean is an extension of JavaBean with enterprise functionality. While both JavaBeans and Enterprise JavaBeans are software component models, the purpose for which they are designed is different.
The underlying principle of both JavaBeans and Enterprise JavaBeans is'Write Once Run Anywhere'.
Accordingly, the primary objective of both the models is to ensure
(1) Portability,
(2) Reusability and
(3) Interoperability of Java software components.
JavaBeans takes a low-level approach for developing reusable software components that can be used for building different types of Java applications(applets, stand-alone apps, etc) in any area.
A Chart bean, for example can be used in scientific, engineering and business computing apps.
JavaBeans can be integrated into your system with ease.
EJB takes a high-level approach for building distributed systems.
The Application developer has to now concentrate on writing ONLY the BUSINESS LOGIC. He is not required to write any Plumbing Code! such as Transactional behavior, Security, connection pooling, networking or threading. These tasks are delegated to the server vendor.
An Enterprise JavaBean is a reusable server-side software component. An EJB is a remote object, which needs the services of an EJB Container to execute in.(An EJB container is a part of the EJB architecture, which we will discuss in my next review!)