Seminar: Enterprise JavaBeans. Agenda Agenda Java™ 2 Platform Java™ 2 Platform Java™ 2 Platform,Enterprise Edition(J2EE) Java™ 2 Platform,Enterprise Edition(J2EE)

Slides:



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

12 Copyright © 2005, Oracle. All rights reserved. Implementing Business Tasks with Session EJBs.
11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
Development and Deployment Roles Venugopal Pakanati.
An architecture for webb applications, J2EE
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.
Overview of The Java Platform Solution for E-Business Applications : JSP, Servlet and EJB.
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)
J2EE Java2 Enterprise Edition by Damian Borth. Contents Introduction Architectures styles Components Scenarios Roles Processing a HTTP request.
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.
Enterprise Programming By J Pearce. Enterprise Software Sales HR Inventory Customer Support Shipping.
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.
© 2004 IBM Corporation BEA WebLogic Server Introduction and Training.
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
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.
Brad Rippe Fullerton College. What you need to get started? JDK 1.3 standard for compilation J2EE - SDK1.2.1 App Server - An EJB Container/Web Container.
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.
HTTP client wide area network (Internet) HTTP proxy HTTP server HTTP gateway firewall HTTP tunnel Copyright Springer Verlag Berlin Heidelberg 2004.
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.
CS 493/693: Distributed Systems Programming V. “Juggy” Jagannathan CSEE, West Virginia University March 21, 2005.
Advanced Java Session 7 New York University School of Continuing and Professional Studies.
Entity Java Beans Jorg Janke Open Source ERP & CRM.
Enterprise Java Beans Part I Kyungmin Cho 2001/04/10.
Enterprise JavaBeans Umer Farooq CS6704: Design Patterns & Component FrameworksFebruary 25, 2002.
The Triad of Beans I Oleh: Dini Addiati ( ) Fahrurrozi Rahman ( Y) Irfan Hilmy ( ) Salman Azis A ( ) Aziiz Surahman.
Presented By Pradeep K Sahu. What will be the Contents of the Seminar ? What is EJB ? EJB Architecture Types of EJB Session Entity Why EJB ? Writing a.
Enterprise JavaBeans. Lesson 1: Introduction to Server-Side Component Software.
Self-executing Java, J2EE James Atlas July 29, 2008.
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.
第十四章 J2EE 入门 Introduction What is J2EE ?
Enterprise Java v120131Intro to JavaEE1 Java EE 5 TM Introduction.
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
Session Beans -) stateless -) stateful. Session Beans A session bean represents a single client inside the J2EE server. To access an application that.
A TUTORIAL TO USING EJBs by SHREERAM IYER 09/17/2001.
J2EE Overview ver 1.0Page 1 © Wipro Technologies Talent Transformation J2EE Overview.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
Enterprise JavaBeans Understanding EJB Components Version 0.1 Kamal Wickramanayake
1 Java EE Programming Enterprise JavaBeans. 2 Topics J2EE Overview Enterprise JavaBeans Overview Enterprise Entity Beans Case Study How to build them.
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.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
1 Distributed System using J2EE. 2 What is J2EE?  J2EE (Java2 Enterprise Edition) offers a suite of software specification to design, develop, assemble.
Enterprise Java Beans N.V.RAJASEKHAR REDDY. Definition of EJB EJBs are the components that are the set of classes and interfaces deployed within a container.
Copyright © 2002 ProsoftTraining. All rights reserved. Enterprise JavaBeans.
13 Copyright © 2004, Oracle. All rights reserved. Managing Persistent Data in the Business Tier Entity EJBs.
©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.
Middleware Technology (J2EE/EJB) EJB Fundamentals.
Advanced Java Session 7 New York University School of Continuing and Professional Studies.
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)
Introduction to J2EE Architecture
Enterprise Java Beans Bina Ramamurthy 1/13/2019 B.Ramamurthy.
Enterprise Java Beans Bina Ramamurthy 4/5/2019 B.Ramamurthy.
Knowledge Byte In this section, you will learn about:
Presentation transcript:

Seminar: Enterprise JavaBeans

Agenda Agenda Java™ 2 Platform Java™ 2 Platform Java™ 2 Platform,Enterprise Edition(J2EE) Java™ 2 Platform,Enterprise Edition(J2EE) Enterprise JavaBeans ™ Enterprise JavaBeans ™ Enterprise JavaBeans ™ Architecture Enterprise JavaBeans ™ Architecture

Java™ 2 Platform

Java History  1995 Sun World95  1996 JDK1.0 Final Release  1997 JDK1.1 Final Release  1999 JDK1.2 Final Release  2000 JDK1.3 Final Release

Today/Tomorrow Web Content EntertainmentTravel Personal Finance E-commerce Voice Over IP Long Distance Phone

Today’s Enterprise

Short History of Java Enterprise Technology

Java™ 2 Platform  Java™ 2 Platform,Standard Edition(J2SE)  Java™ 2 Platform,Enterprise Edition(J2EE)  Java™ 2 Platform,Micro Edition(J2ME)

Java™ 2 Platform

Java History

Java Enterprise Architecture PDA Kiosk Java Device VideoServer SolsticeFirewall WebServer Workstation Server Java Desktop Corporate LAN PC WorkgroupServer Mainframe Public Internet Corporate Intranet Firewall Beeper Cell Phone ATM Game

Agenda Agenda Java™ 2 Platform Java™ 2 Platform Java™ 2 Platform,Enterprise Edition(J2EE) Java™ 2 Platform,Enterprise Edition(J2EE) Enterprise JavaBeans ™ Enterprise JavaBeans ™ Enterprise JavaBeans ™ Architecture Enterprise JavaBeans ™ Architecture

Java™ 2 Platform Enterprise Edition(J2EE)

Application Servers  Provides infrastructure to support management of business logic and access to services  Provide proprietary APIs,which leads to vendor lock  Diminishes ability to reuse business logic on another vendor’s application servers

Enterprise Goals  Reuse  Interoperability  Portability  Time-to-Market

Why another Java 2 Platform? Enterprise Services Require Availability Distribution Concurrency Security Consistency Scalability EIS Integration Administration

What is J2EE ?  J2EE is An Integrated Application Environment ( consist of below ) – –API specifications (EJB,JSP,JDBC etc) Defines J2EE requirements – –Reference implementation of APIs Operational J2EE platform – –Compatibility tests with branding Validates J2EE platform compatibility – –Application Programming Model Describes how to build J2EE application

What is J2EE ?  The enterprise developer can concentrate on application components,not the underlying services  Separation of business logic and services provide for better reuse of business logic BusinesslogicBusinesslogic ServicesServices

J2EE Architecture

J2EE API Summary J2SE 1.3 JDBC 2.0 RMI/IIOP 1.0 EJB 1.1.x Servlet 2.2 JSP 1.1 J2SE 1.3 JDBC 2.0 RMI/IIOP 1.0 EJB 1.1.x Servlet 2.2 JSP 1.1 JNDI 1.2 JTA 1.0 JMS 1.0 JavaMail 1.1 JAF 1.0 JNDI 1.2 JTA 1.0 JMS 1.0 JavaMail 1.1 JAF 1.0

J2EE Standard Services Web Database Naming and Directory Management Protocol Transaction Web Database Naming and Directory Management Protocol Transaction Servlet/JSP(HTML/XML) JDBC TM JNDI JMX JavaMail TM JavaIDL/RMI OTS/JTS/JTA Servlet/JSP(HTML/XML) JDBC TM JNDI JMX JavaMail TM JavaIDL/RMI OTS/JTS/JTA Services Java Technology

J2EE Platform

J2EE is important  Integrated Application Environment  Open platform  Integrates with existing environments  Provides foundation for future development

Agenda Agenda Java™ 2 Platform Java™ 2 Platform Java™ 2 Platform,Enterprise Edition(J2EE) Java™ 2 Platform,Enterprise Edition(J2EE) Enterprise JavaBeans ™ Enterprise JavaBeans ™ Enterprise JavaBeans ™ Architecture Enterprise JavaBeans ™ Architecture

Enterprise JavaBeans ™

EJB Architecture

EJB Design Goals  Simplify development/deployment of distributed applications  Achieve broad industry acceptance  The right expert focuses on the right job  Platform independent and protocol neutral  Enable development of portable components - Truly enable reuse

  A server-side component architecture   Model to enable efficient development and deployment of Java applications : – –Transactional,Portable – –Distributed,Multi-tier – –Scalable – –Secure Defining Enterprise JavaBeans

 EJB is not JavaBeans  a Server Component specification for Java  Separates business and system programming  Portability of business objects  Extensibility through vendor features

JavaBeans Versus Enterprise JavaBeans Java Beans Can be either visible or non-visible Intended to be local to a single process on the client side Uses the BeanInfo classes, Property Editors & Customizers to describe itself Can also be deployed as an ActiveX control Java Beans Can be either visible or non-visible Intended to be local to a single process on the client side Uses the BeanInfo classes, Property Editors & Customizers to describe itself Can also be deployed as an ActiveX control Enterprise JavaBeans Are decidedly Non-Visible, remote objects Remotely executable components deployed on the server Uses the Deployment Descriptor to describe itself Can not deployed as an ActiveX control since OCXs run on the desktop Enterprise JavaBeans Are decidedly Non-Visible, remote objects Remotely executable components deployed on the server Uses the Deployment Descriptor to describe itself Can not deployed as an ActiveX control since OCXs run on the desktop

JavaBeans Versus Enterprise JavaBeans Java Beans Server Client Enterprise information Services Enterprise information Services Existing application Database EJB2 EJB3 EJB1 Java Beans Container Server manages resources such as threads, connection pooling, caching, and state management

What Is Special About EJBs?  Learn once  Write Once, Run Anywhere TM  Portable and interoperable  Flexible and extensible  Scalable  Easier to write distributed applications  Transaction management  CORBA compatible

Agenda Agenda Java™ 2 Platform Java™ 2 Platform Java™ 2 Platform,Enterprise Edition(J2EE) Java™ 2 Platform,Enterprise Edition(J2EE) Enterprise JavaBeans ™ Enterprise JavaBeans ™ Enterprise JavaBeans ™ Architecture Enterprise JavaBeans ™ Architecture

Enterprise JavaBeans ™ Architecture

Key Components in EJB  EJB Server  EJB container  Home Object  EJBObject  Enterprise Bean

EJB Architecture Overview EJB Home Class EJB Object Interface EJB Home Interface EJB Object Class EJB Class Deployment Descriptor Manifest EJB Server EJB Container

EJB Architecture Overview ClientClient Enterprise Properties HomeObjectHomeObject EJBObjectEJBObject EJBEJB JNDI NamingTransactionPersistenceSecurity Services

Application Life Cycle

EJB Server  Provides System Services  Transaction support  Database access  System resource  Namespace  Implementations  Middleware servers  Application servers  Database servers

EJB Server  Supplies containers for EJBs  API between server and container is currently vendor specific currently vendor specific  Server could provide several container types to provide various extended types to provide various extended services to different beans services to different beans

EJB Container  Currently provided by EJB Server  EJB access to server resource through standard API standard API  May Contain one or multiple classes  Tools for EJB creation and deployment

EJB Container  Some standard services  Persistence  EJB instance creation & location  Namespace  Transaction control  Swapping  Security  Custom services  Application-specific  Bridge to existing systems

Home Interface  Factory interface for the bean:  Interface provided by EJB developer  Class generated by vendor tool  One factory class per bean class  Factory instance is installed into the server’s naming service server’s naming service

Home Interface import java.io.Serializable; import java.rmi.RemoteException; import javax.ejb.CreateException; import javax.ejb.EJBHome; public interface ConverterHome extends EJBHome { Converter create() throws RemoteException, CreateException; }

Remote Interface  Interface is provided by bean developer  Implementation is provided by container tools, which include container tools, which include  Stubs and Skeletons  The EJB Object

Remote Interface import javax.ejb.EJBObject; import java.rmi.RemoteException; public interface Converter extends EJBObject { public double dollarToYen(double dollars) throws RemoteException; public double yenToEuro(double yen) throws RemoteException; }

EJB Object  The EJB Object is a wrapper object that Acts as a proxy to the EJB instance  Interface provided by Bean Developer  Implementation class generated by tool  Each business method has a corresponding method in the EJB Object method in the EJB Object  Wrapper method implements container- provided services provided services

EJB Architecture Overview ClientClient HomeInterfaceHomeInterface RemoteInterfaceRemoteInterfaceEJBEJB Home Object EJB Object Bean RemoteInterfaceRemoteInterfaceEJBEJB StubStub SkeletonSkeleton

EJB Source import java.rmi.RemoteException; import javax.ejb.*; public class ConverterEJB implements SessionBean { public double dollarToYen(double dollars) { return dollars * ; } public double yenToEuro(double yen) { return yen * ; } public ConverterEJB() {} public void ejbCreate() {} public void ejbRemove() {} public void ejbActivate() {} public void ejbPassivate() {} public void setSessionContext(SessionContext sc) {} }

Types of EJBs Server Client Enterprise information Services Enterprise information Services Existing application Database EJB2 EJB3 EJB1 Container Proxy Session Beans Client state Entity Beans State of data

Session Beans Versus Entity Beans Session Beans Private client resource Bean carries client state Bean is not persistent Lifetime is controlled by client Transactional participant Single-threaded Mandatory since 1.0 Session Beans Private client resource Bean carries client state Bean is not persistent Lifetime is controlled by client Transactional participant Single-threaded Mandatory since 1.0 Entity Beans Access by multiple clients concurrently Bean represents state of data in data store Bean is persistent Lifetime corresponds to its persistent store Transactional by nature Single-threaded Mandatory since 1.1 Entity Beans Access by multiple clients concurrently Bean represents state of data in data store Bean is persistent Lifetime corresponds to its persistent store Transactional by nature Single-threaded Mandatory since 1.1

Client Source import javax.naming.*; import javax.rmi.PortableRemoteObject; import Converter; import ConverterHome; public class ConverterClient { public static void main(String[] args) { try {Context initial = new InitialContext(); Object objref = initial.lookup("MyConverter"); ConverterHome home = (ConverterHome)PortableRemoteObject.narrow(objref,ConverterHome.class); Converter currencyConverter = home.create(); double amount = currencyConverter.dollarToYen(100.00); System.out.println(String.valueOf(amount)); amount = currencyConverter.yenToEuro(100.00); System.out.println(String.valueOf(amount)); } catch (Exception ex) { } }

Enterprise EJB Scenario HTTP response HTTP request DB Enterprise Application Server JSPs Back Office JDBCJDBC JDBCJDBC JMSJMS JMSJMS EJBs JSP/Servlet Java Beans Java Beans