enterprise java beans part i kyungmin cho 2001/04/10

Post on 29-Dec-2015

220 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Enterprise Java BeansEnterprise Java BeansPart IPart I

Kyungmin Cho

2001/04/10

2

AgendaAgenda

JavaBeans and Enterprise JavaBeans

EJB component model

EJB Architecture

3

JavaBeans and Enterprise JavaBeans

4

Defining Defining EEnterprise nterprise JJavaavaBBeans(1)eans(1)A server-side component architecture

Model to enable efficient development and deployment of Java applications :

Transactional,PortableDistributed,Multi-tierScalableSecure

5

Defining Defining EEnterprise nterprise JJavaavaBBeans(2)eans(2)

EJB is not JavaBeans

a Server Component specification for Java

Separates business and system programming

Portability of business objects

Extensibility through vendor features

6

Defining Defining JavaBeansJavaBeans(1)(1)A client-side component architecture

Portable, platform-independent component model written in the java programming language

Acts as a bridge between proprietary component models

Provides a seamless and powerful means for developers to build components that run in ActiveX container applications

7

Defining Defining JavaBeansJavaBeans(2)(2)

8

JavaBeans Vs. Enterprise JavaBeans(1)JavaBeans Vs. Enterprise JavaBeans(1)

JavaBeansCan be either visible or non-visibleClient > ServerJava.bean.*Intra-processorEasier to develop than EJB

EJBAre decidedly non-visible, remote objectsServerJavax.ejb.*Inter-processorMore difficult to develop than JavaBeans

9

JavaBeans Vs. Enterprise JavaBeans(2)JavaBeans Vs. Enterprise JavaBeans(2)

Java Beans

Server

Client

Client Enterprise information Services

Enterprise information Services

Existingapplication

Database

EJB2

EJB3

EJB1Java Beans

Java Beans

Java Beans

Java Beans

Container

Server manages resources suchas threads, connection pooling,caching, and state management

10

AgendaAgenda

JavaBeans and Enterprise JavaBeans

EJB component model

EJB Architecture

11

EJB component model

12

What is component?What is component?

Components are made by assembling objects.

13

Component SystemComponent System

Component system is fundamental for assembling and managing components.

14

Client componentClient component

Component = button, list, spread sheet, etc.

Container = window, form, etc.

15

Server component(1)Server component(1)

ComponentInterface is separated from implementation.

ContainerManages message-passing between client and componentAutomatically carry out standard infrastructure services such as transaction and security, etc.

16

Server component(2)Server component(2)

17

AgendaAgenda

JavaBeans and Enterprise JavaBeans

EJB component model

EJB Architecture

What can we do with EJB?

18

EJB Architecture

19

EJB Design GoalsEJB Design GoalsSimplify development/deployment of Simplify development/deployment of distributed applicationsdistributed applicationsAchieve broad industry acceptanceAchieve broad industry acceptanceThe right expert focuses on the right jobThe right expert focuses on the right jobPlatform independent and protocol Platform independent and protocol neutralneutralEnable development of portable Enable development of portable components - Truly enable reusecomponents - Truly enable reuse

20

EJB ArchitectureEJB Architecture

21

What Is Special About EJBs?What Is Special About EJBs?

Learn onceLearn once

Write Once, Run Anywhere Write Once, Run Anywhere TMTM

Portable and interoperablePortable and interoperable

Flexible and extensibleFlexible and extensible

ScalableScalable

Easier to write distributed applicationsEasier to write distributed applications

Transaction managementTransaction management

CORBA compatibleCORBA compatible

22

EJB Architecture RolesEJB Architecture Roles

Bean provider

Container provider

Server provider

Application assembler

Deployer

System administrator

23

Application Life CycleApplication Life Cycle

24

EJB component feature(1)EJB component feature(1)Include business logic

Produce and manage instance at run time

Can be customized by editing environment entry.

Service information is separated from EJB class. This makes Service information to be managed by tools when assembling and deploying application.

Client can access EJB through container.

25

EJB component feature(2)EJB component feature(2)

If EJB uses services which are defined in EJB specification, EJB can be deployed in all EJB containers.

EJB don’t need recompiling and editing source code.

26

EJB Server(1)EJB Server(1)Provides System ServicesProvides System Services

Transaction supportTransaction supportDatabase accessDatabase accessSystem resourceSystem resourceNamespaceNamespace

ImplementationsImplementationsMiddleware serversMiddleware serversApplication serversApplication serversDatabase serversDatabase servers

27

EJB Server(2)EJB Server(2)

Supplies containers for EJBsSupplies containers for EJBs

API between server and container is currAPI between server and container is currently vendor specificently vendor specific

Server could provide several container Server could provide several container types to provide various extended types to provide various extended services to different beansservices to different beans

28

EJB container(1)EJB container(1)

Currently provided by EJB ServerCurrently provided by EJB Server

EJB access to server resource through EJB access to server resource through standard APIstandard API

May Contain one or multiple classesMay Contain one or multiple classes

Tools for EJB creation and deploymentTools for EJB creation and deployment

29

EJB container(2)EJB container(2)Some standard servicesSome standard services

PersistencePersistenceEJB instance creation & locationEJB instance creation & locationNamespaceNamespaceTransaction controlTransaction controlSwappingSwappingSecuritySecurity

Custom servicesCustom servicesApplication-specificApplication-specific

Bridge to existing systemsBridge to existing systems

top related