2.3. Application Configurations Supported by the J2EE Architecture

This section looks at some of the ways in which the J2EE architecture can be used to configure various multitier applications.

In a typical multitier Web application, a Web server implemented using JSP or servlets sends HTML or XML to a Web browser client. It generates dynamic content by making calls to database systems or existing enterprise services using JNDI, JDBC, JavaIDL, and other J2EE supported technologies (see Figure 2.7).

Figure 2.7. Multitier Application with Web Server/JSP Interface


A multitier J2EE application uses Web components and accesses multiple databases, with Enterprise JavaBeans in between to encapsulate more-complex business logic than could be supported in JSP alone (see Figure 2.8). EJBs also automate the transaction monitoring required to access multiple databases. Alternately, the business logic encapsulated in the enterprise beans may be invoked by a client application written in the Java programming language.

Figure 2.8. Multitier Application with Web Server/JSP Interface and EJB Middle Tier


With its inherent flexibility, J2EE can support an endless variety of sophisticated application configurations. For example, business-to-business transactions may be accomplished by XML transfer between J2EE servers, or business-to-consumer confirmations may be sent via JavaMail (see Figure 2.9). Enterprise Java-Beans containers can interact directly using CORBA-based standards, or communicate asynchronously using the newly specified message-driven EJB (see Figure 2.10).

Figure 2.9. Multitier Application with XML B2B Connections


Figure 2.10. General J2EE Application Configuration


While these application configurations are in many ways similar to those shown earlier for standard multitier applications, the advantage that J2EE offers is a simplified, standards-based programming model.The skill required to implement these configurations are divided into a small set of well-defined roles. In addition, the automation provided by J2EE containers reduces the need to acquire new skills to introduce new functionality. J2EE also supports a cleaner migration path between application configurations. For example, a simple online catalog implemented using JSP and JDBC can be rearchitected as an online shopping service by adding EJB business logic in the middle tier. EJB can perform shopping-cart and user-data updates without changing programming models, servers, or other aspects of the application.

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

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