1.1. What Is the Enterprise JavaBeans Architecture?

The Enterprise JavaBeans (EJB) architecture is a specification developed at Sun Microsystems. It describes a component-based architecture that provides for the development and deployment of distributed applications. The specification details the services and requirements of an application server which manages EJB components. It also describes coding requirements that bean developers must follow to create portable applications. The lofty and worthwhile goal is for bean developers to write EJB components once and deploy them on any application server that is compliant with Enterprise JavaBeans technology. Furthermore, the EJB architecture makes enterprise applications scalable, secure, and transactional.

Enterprise JavaBeans are components that execute within an “EJB container,” under the supervision of an application server. There are three main EJB types: session, entity, and message driven. Furthermore, session beans come in two flavors: stateless and stateful. The application server and EJB container provide system services for EJBs, such as data persistence, transactions, security, and resource management. The EJB container maintains pools of database connections, as well as pools of EJB instances that can be assigned to clients as needed.

The Java 2 Platform, Enterprise Edition (J2EE) is an industry-standard suite of Java APIs for enterprise computing from Sun Microsystems. It includes the Enterprise JavaBeans architecture and a set of related packages that make everything work together. For example, a Java client may use the Java Naming and Directory Interface (JNDI) to look up the location of an EJB component. The application server, which provides the system services that make EJBs work, uses Java Remote Method Invocation (RMI) and RMI-IIOP to implement remote calls across a network. Message-driven beans, a new type of EJB, use the Java Message Service (JMS) to provide a bean capable of responding to messages. So, while Enterprise JavaBeans technology provides specific services in the realm of enterprise computing, it is part of a larger picture. This picture is inscribed by J2EE and its many independent packages that provide specific services.

Why should developers care about J2EE and EJB? Because the application server manages an EJB and provides the system services we mentioned, bean developers can concentrate on designing enterprise applications that adhere to specific business requirements. Instead of writing transactional database code, bean developers can pay attention to business rules, business processes, and how to best keep track of business data. Furthermore, as J2EE technology matures, commercial application servers that support this specification will become more numerous. Better still, as these J2EE application server products improve, the same enterprise application written today will perform better tomorrow—unchanged—because the application server will provide a better implementation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.63.114