SEI/CBS Initiative Software Engineering Institute Carnegie Mellon University Pittsburgh, PA 15213-3890 Sponsored by the U.S. Department of Defense © 1999.

Slides:



Advertisements
Similar presentations
Session #, Speaker Name1 Enterprise JavaBeans Architecture Vlada Matena Sun Microsystems Inc.
Advertisements

11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
An architecture for webb applications, J2EE
6/1/20151 Luca Simone Software Engineering 2 a.a. 2001/2002.
1 Softsmith Open Learning - EJB 21-Nov Enterprise Java Beans Introduction –Application ServerApplication Server –Java 2 Enterprise EditionJava.
Introduction to Enterprise JavaBeans. Integrating Software Development Server-side Component Model Distributed Object Architecture –CORBA –DCOM –Java.
Enterprise Java Beans Welcome to the world of “Distributed System” Presented By: Sameer Nanda Date: 12/17/03.
Application Server Lecture Paulo Barroso Kris Carver Todd Kitterman Eric Silva.
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
Java 2 Platform, Enterprise Edition (J2EE). Source: Computer, August 2000 J2EE and Other Java 2 Platform Editions.
July 23 th, 2005 Software Architecture in Practice RiSE’s Seminars Bass’s et al. Book :: Chapter 16 Fred Durão.
J2EE Security and Enterprise Java Beans Mrunal G. Dhond Department of Computing and Information Sciences Master of Science, Final Defense February 26,
SEI/CBS Initiative Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department of Defense © 1999.
Version # Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department of Defense © 1999 by Carnegie.
J2EE Kenneth M. Anderson CSCI Web Technologies October 3, 2001.
Version # Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department of Defense © 1999 by Carnegie.
CS 483 Enterprise and Web Application Programming
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
EJB Overview Celsina Bignoli Distributed Business Applications Server DB Client DB Server DB.
EJB. Component Characteristics An enterprise Bean typically contains business logic that operates on the enterprise’s data. An enterprise Bean’s instances.
1 J2EE Components. 2 Application Servers relieve the programming burden for business distributed components. They provide support for system level services.
Enterprise Java Beans CS-422. Application Servers In the late 1980s and though the mid 1990s a number of corporations (Broadvision, Netscape…) marketed.
1 Session Bean Chuyên đề Lập trình Java & J2EE Chương 14 Biên soạn: Th.S Nguyễn văn Lành.
J2EE Part 2: Enterprise JavaBeans CSCI 4300 Images and code samples from jGuru EJB tutorial,
Enterprise Java Beans - (EJB)
Ing. Ignacio Roqueta ARTech GeneXus and J2EE.
Seminar: Enterprise JavaBeans. Agenda Agenda Java™ 2 Platform Java™ 2 Platform Java™ 2 Platform,Enterprise Edition(J2EE) Java™ 2 Platform,Enterprise Edition(J2EE)
Entity Beans BMP Celsina Bignoli
Entity Java Beans Jorg Janke Open Source ERP & CRM.
Enterprise Java Beans Part I Kyungmin Cho 2001/04/10.
Container-Managed Persistence (CMP) Entity Beans Lesson 3A / Slide 1 of 42J2EE Server Components Objectives In this lesson, you will learn to: Identify.
Enterprise JavaBeans. Lesson 1: Introduction to Server-Side Component Software.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
Introduction to J2EE Architecture Portions by Kunal Mehta.
EJB Framework.  As we know, EJB is the center of the J2EE architecture that provides a sturdy framework for building enterprise applications. The major.
Enterprise Java Bean Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
第十四章 J2EE 入门 Introduction What is J2EE ?
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
Enterprise JavaBeans Understanding EJB Components Version 0.1 Kamal Wickramanayake
© jGuru.com Enterprise JavaBeans Fundamentals.
Version # Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department of Defense © 1999 by Carnegie.
SEI/CBS Initiative Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department of Defense © 1999.
Introduction to Enterprise JavaBeans Topics In Systems Architecture Barry Herbold
Assignment of JAVA id : BSSE-F10-M-10-JAVA1 Overview of J2EE/Session 2/Slide 1 of 38.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Enterprise Java Bean Technology Briefing Markus Hebach.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
1 Distributed System using J2EE. 2 What is J2EE?  J2EE (Java2 Enterprise Edition) offers a suite of software specification to design, develop, assemble.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Copyright © 2002 ProsoftTraining. All rights reserved. Enterprise JavaBeans.
Creating competitive advantage Copyright © 2003 Enterprise Java Beans Presenter: Wickramanayake HMKSK Version:0.1 Last Updated:
©NIIT Introducing Enterprise JavaBeans (EJB) Lesson 1A / Slide 1 of 43J2EE Server Components Objectives In this lesson, you will learn about: The features.
Alan L. Batongbacal CS 4244 / 01 Nov 2000
Enterprise JavaBeans. Lesson 1: Introduction to Server-Side Component Software.
Middleware Technology (J2EE/EJB) EJB Fundamentals.
EJB Enterprise Java Beans JAVA Enterprise Edition
EJB. Introduction Enterprise Java Beans is a specification for creating server- side scalable, transactional, multi-user secure enterprise-level applications.
14 Copyright © 2004, Oracle. All rights reserved. Achieving State Management in the Business Tier.
©NIIT Session Beans Lesson 1B/ Slide 1 of 37J2EE Server Components Objectives In this lesson, you will learn to: Describe the characteristics of session.
J2EE Platform Overview (Application Architecture)
EJB (Enterprise Java Beans)
Luca Simone Software Engineering 2 a.a. 2001/2002
Komponentbasert utvikling Den sanne objektorientering
Enterprise Java Beans Bina Ramamurthy 1/13/2019 B.Ramamurthy.
Component-based Applications
Component Technology Bina Ramamurthy 2/25/2019 B.Ramamurthy.
Enterprise Java Beans Bina Ramamurthy 4/5/2019 B.Ramamurthy.
Presentation transcript:

SEI/CBS Initiative Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department of Defense © 1999 by Carnegie Mellon University Enterprise Java Beans - page 1 Enterprise JavaBeans (EJB) Overview

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 2 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB Overview What is EJB? EJB Roles EJB Architecture EJB Services Building an EJB Application EJB & CORBA Summary

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 3 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB in the n-Tier System LegacySystems ClientApplication EJB Server ClientsApplicationData You Are Here Database ClientApplet Browser

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 4 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. What is EJB? Specification for component based distributed computing framework using Java technology. Enterprise JavaBeans Specification describes roles and responsibilities for component-based software development of server-side applications. an architecture including EJB Servers, Containers, and Beans. a set of service interfaces including naming, transactions and security. interoperability with database servers and CORBA applications.

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 5 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB Specification Evolving Technology Release March 98, Final Release May 99, Public Draft Goals Component-Based software development. Separate business logic from system code. Address application life cycle. Compatible with CORBA (non Java apps). Specification owned by Sun and supported by 40+ companies.

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 6 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB Roles Bean Provider Application Assembler Deployer System Admins Platform Provider Application Development and Deployment - Producer of enterprise beans. - Combines enterprise beans into larger deployable parts. - Deploys enterprise beans into a specific operational environment. - Container provider and server provider. - Configuration and administration of infrastructure.

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 7 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB Architecture Picture provided by Sun Microsystems, Inc. The container is the platform. The component is your application.

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 8 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB Platform Container Manage EJ Bean life cycle Make EJ Bean Interfaces Available with JNDI Provide basic security services Persistence Management (DBMS and other) Manage transaction context Provide naming service using JNDI Provide OMG/OTS compliant transaction service EJB Server

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 9 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB Platform Vendors Select EJB complaint platform for purchase (1.0 or 1.1). EJB Platform vendors supplement standard EJB with proprietary features. Current Vendors include: BEA Systems - WebLogic Bluestone - Sapphire/Web IBM - WebSphere Inprise - Application Server Netscape - Application Server (future) Oracle - Oracle8i Persistence - PowerTier Sun - NetDynamics

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 10 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB Application Enterprise JavaBeans™ Component Application consists of multiple beans Beans are “portable” across containers Beans can be purchased or constructed

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 11 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Types of Enterprise Java Beans Session Bean Used for client interface Not shared between clients Two kinds of Session Bean: -stateless - common object identity -stateful - unique object identity Entity Bean Maps to data in database or application Shared between clients Persistent state -container managed - access defined at deployment -bean managed - access defined as part of bean Support optional in 1.0 and mandatory in 1.1

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 12 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Entity Bean Session Bean Mixing Beans EJB applications use a combination of entity beans and session beans to implement business logic. Application Server Database Client PrefixBean SuffixBean EchoServiceBean

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 13 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB Client Interfaces EJB Home EJB Object Factory Interface Finder Interface Remote Interface Contains bean services seen by clients

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 14 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB Architecture Picture provided by Sun Microsystems, Inc. The purchased EJB server is the platform. The application consists of session and entity beans. Application interfaces are made available to clients at time of deployment.

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 15 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Deployment Deployment provides a mechanism for adapting a component for a specific runtime environment. Deployment is an intermediate step between coding a bean and executing a bean. This allows some attributes of the bean implementation to be determined by the platform provider, and the deployer. Key EJ bean design decision is determining which bean attributes are coded into the bean and which are decided at deployment time. Deployment descriptor + Deploy Bean Platform Specific Implementation of Bean

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 16 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB Overview What is EJB? EJB Roles EJB Architecture EJB Services Building an EJB Application EJB & CORBA Summary

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 17 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB Services Standard EJB service interfaces allow application developers to : focus on business logic rather than infrastructure defer responsibility for common services to the EJB platform create “portable” applications that can be reused support a component marketplace Standard EJB service interfaces include: Persistence - JDBC Naming - JNDI Transactions - UserTransaction interface of JTA Security - java.security in JDK

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 18 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Container-Managed Persistence Benefits Developer can defer persistence to container. Bean need not contain database specific code because decision is made at deployment time. Choice of bean managed persistence if needed. Generated Bean Code SQL code persistence logic Deployment Descriptor database table database pool (location) Deploy

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 19 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Name Service - Deployment Benefits EJB server has built-in name server. Bean need not contain name specific code because decision is made at deployment time. Some EJB servers support enterprise bean replication. Deploy Deployment Descriptor bean home name

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 20 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Name Service - Lookup Benefits JNDI allows developer to use one interface for locating CORBA, LDAP, NDS, and file objects. Allows management of enterprise wide services using naming hierarchy. Runtime MyClient Context ct= getInitialContext(…) ct.lookup(“EchoService”)

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 21 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Transactions Picture provided by Sun Microsystems, Inc. Benefits Developers defer transaction logic to EJB server and container. Distributed transactions (future).

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 22 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Security EJB Benefits Developer can specify permissions for each bean service at deployment time. Builds on security of JDK. Detailed discussion by Robert Seacord. Deploy Deployment Descriptor security roles... Generated Bean Code security logic

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 23 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Building an EJB Application Database Client Application Server How do we build an EJB application?

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 24 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Step 1: Create Interfaces Database Client EJB Server Home I/F Remote I/F EJB specification This is generated You write this Specifies the interface provided to bean clients public interface Account extends EJBHome{ public getName(…) public setName(…) Specifies the life cycle interfaces public interface AccountHome extends EJBHome{ public create(…) public findByPrimaryKey(..)

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 25 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Step 2: Create Implementation Database Client EJB Server Home I/F Remote I/F Account EntityBean implements EJB specification This is generated You write this Implements bean interfaces public class AccountBean implements EntityBean { public void ejbActivate(...) {………} public void ejbPassivate(…) {……….} public getName(…) {……..} public setName(…) {…….. }

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 26 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Step 3: Deployment Descriptor Database Client EJB Server Home I/F Remote I/F Account EntityBean Deployment descriptor implements EJB specification This is generated You write this “Tells” the container how to deploy the bean (how to do DBMS access, transactions, security, naming, etc.)

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 27 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Step 4: Deploy Database Client EJB Server Home obj Remote obj Home I/F Remote I/F Account EntityBean Deployment descriptor implements delegates EJB specification This is generated You write this

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 28 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Entity Bean Inheritance - 1 Java.rmi.RemoteJava.io.Serializable JDK EJB Spec Bean Provider (Wombat) Produced by Acme tools Container Provider (Acme) EJBMetaData EJBObject EJBHome EnterpriseBean EntityBean Extends or implements interface Extends implementation, code generation or delegation

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 29 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Entity Bean Inheritance - 2 Java.rmi.RemoteJava.io.Serializable JDK EJB Spec Bean Provider (Wombat) Produced by Acme tools Container Provider (Acme) EJBMetaData AccountHome EJBObject AccountBean EJBHome EnterpriseBean Account EntityBean Extends or implements interface Extends implementation, code generation or delegation

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 30 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Entity Bean Inheritance - 3 Java.rmi.RemoteJava.io.Serializable JDK EJB Spec Bean Provider (Wombat) Produced by Acme tools Container Provider (Acme) EJBMetaData AccountHome AcmeHome AcmeAccountHome EJBObject AccountBean AcmeRemote AcmeRemoteAccount EJBHome EnterpriseBean Account AcmeMetaData AcmeBean AcmeAccountMetaDataAcmeAccountBean EntityBean Extends or implements interface Extends implementation, code generation or delegation

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 31 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. EJB & CORBA EJB and CORBA are complimentary standards. EJB uses CORBA for: Enabling non-Java clients to access EJB applications. Interoperability for EJB environments that include systems from multiple vendors. EJB-to-CORBA mapping (separate specification) Mapping of EJB interfaces to RMI-IIOP. Propagating transaction context. Propagating security context. Interoperable naming service.

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 32 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. Summary The EJB architecture simplifies application development by: providing pre-integrated solution framework separating the business logic from distributed system services providing standard service interfaces, including naming, transactions, and security managing life cycle functions

© 1999 by Carnegie Mellon University SEI/CBS Initiative Enterprise Java Beans- page 33 Delete this red box (from the slide master) after creating all of your slides. Keep everything inside the “safe area” for correct display. References [1] Enterprise JavaBeans TM Specification Version [2] Enterprise JavaBeans TM Specification Version [3] Enterprise JavaBeans TM Tools