8.1 Application Overview

Our example application illustrates the development and deployment of an enterprise application that consists of components developed by multiple vendors.

8.1.1 Problem Description

The example entity bean application implements a benefits self-service application. An employee uses this application to select and enroll in the benefits plans offered by the company. From the end-user perspective, the application is identical to the benefits application built using session beans, described in Chapter 4, Working with Session Beans. However, the design of the two applications differs as follows:

  • The application uses entity beans with CMP to manage their persistent state. Because the entity beans use CMP, the benefits application contains no explicit database access code, and the amount of code in each entity bean is reduced drastically. Using CMP also facilitates storing the application's persistent state in a wide variety of persistence stores, including relational databases.

  • Wombat Inc. developed the benefits application. Wombat is an ISV that specializes in the development of benefits applications used by enterprises. Because Wombat wants to sell its application to as many different enterprises as it can, its application must work in a myriad of operational environments. In contrast, Star Enterprise's IT department developed the application illustrated in Chapter 4. Because it was intended to be used only within Star Enterprise's own environment, that application was developed with no regard for the application's portability to other operational environments.

  • The application described in this chapter allows dynamic changes to the configuration of the available medical and dental plans. For example, a benefits administrator at Star Enterprise can add and remove medical and dental plans to the benefits application. In contrast, the application in Chapter 4 requires redeployment to change the configuration of the available plans.

8.1.2 Main Parts of the Application

The example application presented here consists of multiple enterprise beans, Web applications, and databases. Typical for an application such as this, some parts already existed at Star Enterprise, whereas outside organizations developed the other parts. Figure 8.1 illustrates the logical parts of the application.

Figure 8.1. Logical Parts of the Entity Bean Benefits Application

graphics/08fig01.gif

The application consists of two principal parts, which come from two sources:

  1. The preexisting employee and payroll databases and PayrollEJB bean in the Star Enterprise operational environment

  2. The Wombat benefits application, which consists of multiple enterprise beans and Web applications

Prior to the deployment of Wombat's benefits application, Star Enterprise used the EmployeeDatabase, PayrollDatabase, and PayrollEJB parts. These parts pertain to the following aspects of Star Enterprise's business:

  • EmployeeDatabase contains information about Star Enterprise employees.

  • PayrollDatabase contains payroll information about Star Enterprise.

  • PayrollEJB is a stateless session bean that provides nonpayroll applications with secure access to the payroll database. Nonpayroll applications, including Wombat's benefits application, use PayrollEJB as the payroll integration interface.

Wombat, an ISV, has implemented the bulk of the benefits application. Wombat develops multiple Web applications and enterprise beans, as follows:

  • EnrollmentWeb is a Web application that implements the presentation logic for the benefits enrollment process. A Wombat customer's employees, such as Star Enterprise employees when the application is deployed at Star Enterprise, access EnrollmentWeb via a browser.

  • BenefitsAdminWeb is a Web application that implements the presentation logic for business processes used by the customer's benefits administration department. The benefits administration department uses BenefitsAdminWeb, for example, to customize the portfolio of plans offered to the employees.

  • EnrollmentEJB, a stateful session bean that implements the benefits enrollment business process, uses several entity beans to perform its function.

  • EmployeeEJB, an entity bean that encapsulates access to the customer's Star Enterprise, in this example employee information, uses CMP, and its main role is to allow deployment binding with the customer's employee database.

  • SelectionEJB, PlanEJB, and DoctorEJB are entity beans that encapsulate the benefits selections, medical and dental plan information, and physician information, respectively.

  • BenefitsDatabase stores the information used by the SelectionEJB, PlanEJB, and DoctorEJB entity beans.

8.1.3 Distributed Deployment

The EJB architecture provides the power and flexibility necessary to enable distributed deployment of various components in an enterprise application. Although it is possible to deploy all the Web and EJB components in a single J2EE server and to aggregate all the databases into a single database, the traditional division of "information ownership" by multiple departments within a large enterprise leads to a distributed deployment scenario illustrated in Figure 8.2. Star Enterprise has deployed the benefits application across multiple servers, including six servers within its own enterprise intranet.

Figure 8.2. Benefits Application Deployment

graphics/08fig02.gif

The benefits department has deployed the EnrollmentWeb and BenefitsWeb Web applications on the Benefits Web server, and the enterprise beans EnrollmentEJB, SelectionEJB, EmployeeEJB, PlanEJB, and DoctorEJB on the Benefits App server. BenefitsDatabase is stored on the Benefits Database server. The enterprise bean PayrollEJB is deployed on the Payroll App server, which in turn provides access to the PayrollDatabase server. EmployeeDatabase is stored on the Human Resources (HR) Database server.



Applying Enterprise Javabeans
Applying Enterprise JavaBeans(TM): Component-Based Development for the J2EE(TM) Platform
ISBN: 0201702673
EAN: 2147483647
Year: 2003
Pages: 110

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net