Top Banner
Enterprise JavaBeans Layer:01 Overview
38

Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Jan 02, 2019

Download

Documents

vannga
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Enterprise JavaBeans

Layer:01

Overview

Page 2: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 2

Agenda

• Course introduction & overview.• Hardware & software configuration.• Evolution of enterprise technology.• J2EE framework & components.• EJB framework & components.

Page 3: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Course Overview

Page 4: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 4

Introduction

• During this course we'll explore Sun Microsystems' Enterprise JavaBeanscomponent object model.

• Because of its complexity, this course can't provide complete coverage over all aspects of the EJB framework.

• This course will serve as a foundation upon which later knowledge can be based.

Page 5: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 5

Prerequisites

• Because this course involves enterprise Java, I assume the following knowledge:– Servlet, JSP, and JDBC development– Ability to perform installation, configuration,

administration, and troubleshooting tasks.• If you haven't met the official prerequisites

for this course, I strongly suggest you drop.

Page 6: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 6

Required Texts

• Enterprise JavaBeans, 2nd Edition. Richard Monson-Haefel. O'Reilly & Associates. 2000.

• Enterprise JavaBeans 1.1 specification.

Page 7: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 7

Grading

• Your final grade will be calculated using the following weights:Homework 30%Midterm 30%Final 30%Participation 10%

Page 8: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Hardware & Software

Page 9: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 9

Operating System

• For this course I strongly recommend the following operating systems:– Windows NT 4.0– Windows 2000– Linux

• If you're running Windows 95/98/ME, I won't guarantee or support the behavior of the EJB server.

Page 10: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 10

Required Software

• The following is the required software for this course:– Jakarta-Tomcat 3.2 or later– JBoss 2.2.2– Cloudscape 3.6.4– Ant 1.3– JUnit 3.7

• This list is non-negotiable. I'll accept no substitutions or alterations.

Page 11: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Enterprise Evolution

Page 12: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 12

Goals

• Modern companies have specific goals for the enterprise information systems:– Time-to-market– Portability– Interoperability– Lower cost

Page 13: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 13

Architectures

• Architectures have undergone three (3) key evolutions:– 1-tier: This is the traditional mainframe

architecture.– 2-tier: This is the client-server model.– N-tier: This is the current model whereby we

distribute our software over a set of machines all of which comprise a part of the application.

Page 14: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 14

Issues

• Each architecture has specific issues in the areas of:– Maintainability– Manageability– Performance– Availability

Page 15: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

J2EE Framework

Page 16: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 16

What is J2EE?1 of 3

• The Java 2 Enterprise Edition (J2EE) is a Java-based service-oriented framework.

• The goal is to allow developers to focus on solving business problems, rather than on developing system services.

• This provides for separation of business logic from system services.

Page 17: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 17

What is J2EE?2 of 3

• The J2EE technology components can be arranged by the service it provides:

JTATransactions

JavaIDL, RMI, RMI-IIOP

Distributed Objects

JavaMail, JAFEmail

JMSMessaging

JNDINaming & Directory

JDBCDatabase

Servlets, JSPWeb

J2EE Technology

Service

Page 18: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 18

What is J2EE?3 of 3

• J2EE consists of four (4) main elements:– Specification– Reference implementation– Compatibility test suite– Blueprints

Page 19: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 19

Specification

• The J2EE specification outlines what services must be provided by a vendor that wishes to be J2EE compliant.

• Specifications typically outline minimumrequirements.

• The specification often defines the API to be provided to a developer.

Page 20: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 20

Reference Implementation

• The J2EE reference implementation is a fully functional J2EE server that provides web and EJB containers.

• It's used to demonstrate that a product can be built that implements the specification as written.

• It isn't meant to be production-grade software.

Page 21: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 21

Compatibility Test Suite

• The J2EE compatibility test suite is used to evaluate a vendor product to ensure that it meets the requirements of J2EE as defined by the specification.

• Any vendor that wishes to market its product as "J2EE compliant" must submit that product for testing.

Page 22: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 22

Blueprints

• The J2EE blueprints are an effort by the Sun Java Development Center to document the best practices involving the use of J2EE components.

• In many ways the blueprints are similar to the design patterns you studied in SE455.

Page 23: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

EJB Framework

Page 24: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 24

Overview

CMP

BMTDesign

BMP

CMT

Entity Beans

Cont-ainer

Session BeansServer

• EJB technology is a complex subject.

• While these aren't the only topics of interest within the EJB framework, they're the most critical.

Page 25: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 25

What are Enterprise JavaBeans?

• Enterprise JavaBeans (EJB) is an architecture for component-based distributed computing.

• Typically EJBs are elements of business processing that could be shared across applications as well as across a network.

Page 26: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 26

EJB Components

• There are four (4) main components to EJB technology:– EJB server– EJB container– EJB– Deployment descriptor

Page 27: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 27

EJB Server

• The EJB server provides common services available to all EJBs.

• The server's job is to hide the complexity of these services from the applications that require them.

Page 28: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 28

Services

• The EJB specification outlines six(6) services that must be provided by each server:– Naming– Transaction– Security– Persistence– Concurrency– Lifecycle

Page 29: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 29

EJB Container

• The EJB container integrates with the EJB server and acts as an intermediary between the server and EJBs.

• It provides services such as:– EJB instance lifecycle management– EJB instance identification

Page 30: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 30

EJB Roles

• The EJB specification outlines six (6) key roles required for EJB development:– Bean provider– Application assembler– Deployer– Server provider– Container provider– System administrator

Page 31: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 31

Bean Provider

• The bean provider is a developer.• They're responsible for translating business

requirements into physical code within an EJB.

• The final product of the bean provider is an EJB-JAR file containing the appropriate classes as well as the structural content of the deployment descriptor.

Page 32: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 32

Application Assembler

• The application assembler is often a team lead or senior developer.

• They're responsible for packaging all of the EJB-JAR files generated by the bean providers into a complete application.

• Their final product is an EAR file containing the appropriate EJB-JAR files.

Page 33: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 33

Deployer

• The deployer is usually a senior developer or architect.

• They're responsible for installing the application into the target runtime environment.

• They've got to be familiar with all aspects of the environment including security and transaction support.

Page 34: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 34

Server Provider

• The server provider is usually an external vendor.

• Most clients don't have the time, money, or interest to develop their own EJB servers.

• The job of the server provider is to produce an EJB server that's compliant with the EJB specifications.

Page 35: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 35

Container Provider

• The container provider is usually an external vendor and is often the same as the server vendor.

• Most clients don't have the time, money, or interest to develop their own EJB containers.

• The container provider produces an EJB container that's compliant with the EJB specifications.

Page 36: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 36

System Administrator

• The system administrator is generally a member of the organization into which an application is being installed.

• Their task to ensure that the runtime environment is configured in such a way that the application can function correctly and integrate with all of the required external components.

Page 37: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 37

Summary

• Course introduction & overview.• Hardware & software configuration.• Evolution of enterprise technology.• J2EE framework & components.• EJB framework & components.

Page 38: Enterprise JavaBeans - DePaul University | DePaul ...condor.depaul.edu/cjones1/depaul/se554/download/se554-layer-01.pdf · Enterprise JavaBeans component object model. ... Because

Last Revised: 10/2/2001 Copyright (C) 2001 38

Next Steps

• Make sure that you install, configure, and test the software required for this class.

• Read chapters 1-2 in your text.