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.

Slides:



Advertisements
Similar presentations
J0 1 Marco Ronchetti - Basi di Dati Web e Distribuite – Laurea Specialistica in Informatica – Università di Trento.
Advertisements

Session #, Speaker Name1 Enterprise JavaBeans Architecture Vlada Matena Sun Microsystems Inc.
11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
Enterprise JavaBeans Ruslana Svidzinska CSE690. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports.
Approaches to EJB Replication. Overview J2EE architecture –EJB, components, services Replication –Clustering, container, application Conclusions –Advantages.
An architecture for webb applications, J2EE
6/1/20151 Luca Simone Software Engineering 2 a.a. 2001/2002.
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
Introduction to Enterprise JavaBeans. Integrating Software Development Server-side Component Model Distributed Object Architecture –CORBA –DCOM –Java.
Enterprise Applications & Java/J2EE Technologies Dr. Douglas C. Schmidt Professor of EECS.
Enterprise Java Beans Welcome to the world of “Distributed System” Presented By: Sameer Nanda Date: 12/17/03.
Chapter 13 Physical Architecture Layer Design
Application Server Lecture Paulo Barroso Kris Carver Todd Kitterman Eric Silva.
Point Of Sale(POS) J2EE Application Department : Computer Science Degree : Master Student : Woojin Choi ID : (POS J2EE Application with JRun)
Java 2 Platform, Enterprise Edition (J2EE). Source: Computer, August 2000 J2EE and Other Java 2 Platform Editions.
SEI/CBS Initiative Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department of Defense © 1999.
Nikolaos Korfiatis The Java 2 Enterprise Edition Platform Dept. of Management & Technology-Athens University of Economics and Business Java 2 Platform.
J2EE Kenneth M. Anderson CSCI Web Technologies October 3, 2001.
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.
Distributed System Using Java 2 Enterprise Edition (J2EE)
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.
EJB Enterprise Java Bean.
Ing. Ignacio Roqueta ARTech GeneXus and J2EE.
Enterprise JavaBeans EJB Container Services. EJB container Enterprise JavaBeans are deployed in an EJB container within the application server EJB container.
CS 493/693: Distributed Systems Programming V. “Juggy” Jagannathan CSEE, West Virginia University March 21, 2005.
Entity Beans BMP Celsina Bignoli
Enterprise Java Beans Part I Kyungmin Cho 2001/04/10.
Replication & EJB Graham Morgan. EJB goals Ease development of applications –Hide low-level details such as transactions. Provide framework defining the.
Overview Of Enterprise Java Bean (EJB) COSC 513 Presentation Mei Li March 17, 2001.
Enterprise Java Bean Matt. 2 J2EE 3 J2EE Overview.
The Triad of Beans I Oleh: Dini Addiati ( ) Fahrurrozi Rahman ( Y) Irfan Hilmy ( ) Salman Azis A ( ) Aziiz Surahman.
Enterprise JavaBeans. Lesson 1: Introduction to Server-Side Component Software.
Introduction to J2EE Architecture Portions by Kunal Mehta.
第十四章 J2EE 入门 Introduction What is J2EE ?
J2EE Structure & Definitions Catie Welsh CSE 432
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
1 Java EE Programming Enterprise JavaBeans. 2 Topics J2EE Overview Enterprise JavaBeans Overview Enterprise Entity Beans Case Study How to build them.
Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP.
Introduction to Enterprise JavaBeans Topics In Systems Architecture Barry Herbold
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Enterprise JavaBeans Session Beans. Session beans are a type of Enterprise JavaBean component designed to implement business logic responsible for managing.
Session Beans Based on: Patel, Brose, Silverman, Mastering Enterprise JavaBeans 3.0.
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.
©NIIT Introducing Enterprise JavaBeans (EJB) Lesson 1A / Slide 1 of 43J2EE Server Components Objectives In this lesson, you will learn about: The features.
Enterprise JavaBeans: Fundamentals. EJB Fundamentals(c)CDAC(Formerly NCST)2 Contents Introduction Technology Overview EJB Architecture EJB Specification.
Enterprise JavaBeans. Lesson 1: Introduction to Server-Side Component Software.
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.
J2EE Lecture 10: EJB 3.0 Overview
J2EE Platform Overview (Application Architecture)
Enterprise JAVA Bean.
EJB (Enterprise Java Beans)
Introduction to J2EE Architecture
Ruslana Svidzinska CSE690
Enterprise Java Bean. Overview of EJB View of EJB Conversation Roles in EJB, Types of Enterprise Beans Lifecycle of Beans Developing Applications using.
Introduction to Enterprise JavaBean
Luca Simone Software Engineering 2 a.a. 2001/2002
Component-based Applications
Component Technology Bina Ramamurthy 2/25/2019 B.Ramamurthy.
Enterprise Java Beans Bina Ramamurthy 4/5/2019 B.Ramamurthy.
Enterprise Java Beans.
Knowledge Byte In this section, you will learn about:
Presentation transcript:

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 based on a multi tier, distributed object architecture in which most of application’s logic is moved from the client to the server.

Server Components l Server components are application components that run in an application server.

Overview of EJB Technology Enterprise JavaBeans component model logically extends the JavaBeans component model to support server component. Server components are reusable, prepackaged pieces of application functionality that are designed to run in an application server. EJB can be assembled and customized at deployment time using tools provided by an EJB- compliant Java application server. EJB Component Model

Simplifying Development. The EJB architecture provides an integrated application framework. An EJB server automatically manages a number of tricky middleware services on behalf of the application components. EJB component-builders can concentrate on writing business logic rather than complex middleware

Simplifying Development (cont’d) RESULT: Application get developed more quickly Code is of better quality.

What EJB Means to Us l Developers can focus on writing business logic rather than writing low-level infrastructure like data access, concurrency, transactions, threading, etc. –Reduces development time –Reduces complexity –Increases quality and reliability l The knowledge about EJB is portable among many different products because EJB products are based on a common standard l Greater reuse because code is located in shareable, server objects

So....let’s take a look at Enterprise JavaBeans H Enterprise JavaBeans defines a server component model for the development and deployment of Java applications based on a multi-tier, distributed object architecture H The Enterprise JavaBeans specification defines: –A container model –A definition of the services the container needs to provide to an Enterprise JavaBean, and vice versa –How a container should manage Enterprise JavaBeans

Enterprise JavaBeans Architecture The EJB architecture specifies the responsibilities and interactions among EJB entities  EJB Servers  Enterprise Beans  EJB Clients EJB Server EJB Container Enterprise Bean Enterprise Bean  EJB Containers Clients

EJB Server l The EJB Server provides system services and manages resources –Process and thread management –System resources management –Database connection pooling and caching –Management API Provides a Runtime Environment

EJB Server EJB Container l Hosts the Enterprise JavaBeans l Provides services to Enterprise JavaBeans –Naming –Life cycle management –Persistence (state management) –Transaction Management –Security l Likely provided by server vendor Provides a Run-time Environment for an Enterprise Bean

Enterprise JavaBeans l A specialized Java class where the real business logic lives –May be developer-written or tool-generated l Distributed over a network l Transactional l Secure l Server vendors provide tools that automatically generate distribution, transaction and security behavior EJB Server EJB Container Enterprise Bean Enterprise Bean

EJB Clients l Client access is controlled by the container in which the enterprise Bean is deployed l Clients locates an Enterprise JavaBean through Java Naming and Directory Interface (JNDI) l RMI is the standard method for accessing a bean over a network EJB Server EJB Container Enterprise Bean Enterprise Bean Clients

Enterprise Beans: Session Beans & Entity Beans

Session Beans Represents Process l A transient agent for an individual client that executes on a server (e.g., ShoppingCart) l Session beans are often a client of multiple entity beans Implements javax.ejb.SessionBean interface Implements javax.ejb.SessionBean interface

Session Beans – Stateful or Stateless l A Stateful Session Bean maintains a one-to-one relationship with a Client. It maintains a user “session”. Most common example is an e-commerce application with a “shopping cart” unique for each user. –Container will automatically “swap out” the Session bean if it is inactive. l A Stateless Session Bean can be accessed by multiple incoming clients and keeps no private data. It does not maintain a unique session with a client. –Keeps no persistent data. If it crashes, container simply starts another one and the client transparently connects. –All access to the Bean is serialized.

Entity Bean Represents Data Implements javax.ejb.EntityBean interface Implements javax.ejb.EntityBean interface l Maps a data source to a Java class –table, view, join or stored procedure in a relational database –a set of related records in a database l Each instance of an entity bean is one row of data l Each instance of an entity bean is uniquely identified by a primary key l An Entity Bean can also have additional methods for business logic, etc.

Since Entity Beans represent Data... l Each instance of an Entity Bean is uniquely identified by a primary key object l Primary key can be saved and used later to regain access to the same EJB object identity

Comparing Session and Entity Beans l Represents a specific client (1 instance per client) l Short-lived l Transient l Can be any Java class l May be transactional l Business Logic Beans l Represents underlying data object or context (clients share instance) l Long-lived l Persistent l Can be a class that maps to persistent data (e.g., database) l Always transactional l Beans which represent data Session Beans Entity Beans