Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Enterprise JavaBeans™ Specification, Version 2.0 - Sun Microsystems.pdf
Скачиваний:
14
Добавлен:
24.05.2014
Размер:
2.71 Mб
Скачать

Sun Microsystems Inc

Scenario: Development, assembly, and deploymentEnterprise JavaBeans 2.0, Public Draft

EJB Roles and Scenarios

3.2 Scenario: Development, assembly, and deployment

Aardvark Inc. specializes in application integration. Aardvark developed the AardvarkPayroll enterprise bean, which is a generic payroll access component that allows Java™ applications to access the payroll modules of the leading ERP systems. Aardvark packages the AardvarkPayroll enterprise bean in a standard ejb-jar file and markets it as a customizable enterprise bean to application developers. In the terms of the EJB architecture, Aardvark is the Bean Provider of the AardvarkPayroll bean.

Wombat Inc. is a Web-application development company. Wombat developed an employee self-service application. The application allows a target enterprise’s employees to access and update employee record information. The application includes the EmployeeService, EmployeeServiceAdmin, and EmployeeRecord enterprise beans. The EmployeeRecord bean is a container-managed entity that allows deployment-time integration with an enterprise’s existing human resource applications. In terms of the EJB architecture, Wombat is the Bean Provider of the EmployeeService, EmployeeServiceAdmin, and EmployeeRecord enterprise beans.

In addition to providing access to employee records, Wombat would like to provide employee access to the enterprise’s payroll and pension plan systems. To provide payroll access, Wombat licenses the AardvarkPayroll enterprise bean from Aardvark, and includes it as part of the Wombat application. Because there is no available generic enterprise bean for pension plan access, Wombat decides that a suitable pension plan enterprise bean will have to be developed at deployment time. The pension plan bean will implement the necessary application integration logic, and it is likely that the pension plan bean will be specific to each Wombat customer.

In order to provide a complete solution, Wombat also develops the necessary non-EJB components of the employee self-service application, such as the Java ServerPages™ (JSP) that invoke the enterprise beans and generate the HTML presentation to the clients. Both the JSP pages and enterprise beans are customizable at deployment time because they are intended to be sold to a number of target enterprises that are Wombat customers.

The Wombat application is packaged as a collection of JAR files. A single ejb-jar file contains all the enterprise beans developed by Wombat and also the AardvarkPayroll enterprise bean developed by Aardvark; the other JAR files contain the non-EJB application components, such as the JSP components. The ejb-jar file contains the application assembly instructions describing how the enterprise beans are composed into an application. In terms of the EJB architecture, Wombat performs the role of the Application Assembler.

Acme Corporation is a server software vendor. Acme developed an EJB Server and Container. In terms of the EJB architecture, Acme performs the EJB Container Provider and EJB Server Provider roles.

The ABC Enterprise wants to enable its employees to access and update employee records, payroll information, and pension plan information over the Web. The information is stored in ABC’s ERP system. ABC buys the employee self-service application from Wombat. To host the application, ABC buys the EJB Container and Server from Acme. ABC’s Information Technology (IT) department, with the help of Wombat’s consulting services, deploys the Wombat self-service application. In terms of the EJB architecture, ABC’s IT department and Wombat consulting services perform the Deployer role. ABC’s IT department also develops the ABCPensionPlan enterprise bean that provides the Wombat application with access to ABC’s existing pension plan application.

35

5/31/00

Sun Microsystems Inc.

EJB Roles and Scenarios

Enterprise JavaBeans 2.0, Public Draft Scenario: Development, assembly, and deploy-

ABC’s IT staff is responsible for configuring the Acme product and integrating it with ABC’s existing network infrastructure. The IT staff is responsible for the following tasks: security administration, such as adding and removing employee accounts; adding employees to user groups such as the payroll department; and mapping principals from digital certificates that identify employees on VPN connections from home computers to the Kerberos user accounts that are used on ABC’s intranet. ABC’s IT staff also monitors the well-being of the Wombat application at runtime, and is responsible for servicing any error conditions raised by the application. In terms of the EJB architecture, ABC’s IT staff performs the role of the System Administrator.

5/31/00

36

Sun Microsystems Inc

Scenario: Development, assembly, and deploymentEnterprise JavaBeans 2.0, Public Draft

EJB Roles and Scenarios

The following diagrams illustrates the products of the various EJB Roles.

Aardvark

Payroll

ejb-jar file

(a) Aardvark’s product is an ejb-jar file with an enterprise bean

 

 

Employee

 

Employee

Record

 

 

JAR file

Service

 

 

 

with JSP pages

 

Aardvark

Employee Payroll

ServiceAdmin

ejb-jar file

with assembly instructions

(b)Wombat’s product is an ejb-jar file with several enterprise beans assembled into an application. Wombat’s product also includes non-EJB components.

 

 

Employee

HR module

 

 

Record

 

 

Employee

Aardvark

 

deployed

Service

Payroll module

JSP pages

 

Payroll

 

 

 

 

Employee

ABCPension

 

 

ServiceAdmin

ABC’s ERP System

 

Plan

 

 

 

deployed enterprise beans

 

A Web Server

ACME EJB Container

ABC’s pension

 

 

plan application

 

ACME EJB Server

 

 

(c) Wombat’s application is deployed in ACME’s EJB Container at the ABC enterprise.

37

5/31/00

Sun Microsystems Inc.

EJB Roles and Scenarios

Enterprise JavaBeans 2.0, Public Draft Scenario: Development, assembly, and deploy-

The following table summarizes the EJB Roles of the organizations involved in the scenario.

Table 1

EJB Roles in the example scenarios

 

 

 

Organization

 

EJB Roles

 

 

 

 

 

 

Aardvark Inc.

 

Bean Provider

 

 

 

Wombat Inc.

 

Bean Provider

 

 

Application Assembler

 

 

Acme Corporation

EJB Container Provider

 

 

EJB Server Provider

 

 

ABC Enterprise’s IT staff

Deployer

 

 

Bean Provider (of ABCPensionPlan)

 

 

System Administrator

 

 

 

5/31/00

38