Understanding and Designing with EJB

Slides:



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

11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
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.
1 Softsmith Open Learning - EJB 21-Nov Enterprise Java Beans Introduction –Application ServerApplication Server –Java 2 Enterprise EditionJava.
Project team: Quddus & Rajesh CS590L – Winter ’02 (Project 1) EJB tutorial – Screenshot 1: Creating the remote interface, the session bean class, the home.
Distributed System Using Java 2 Enterprise Edition (J2EE) B.Ramamurthy.
1 James Lynn Hewlett-Packard Middleware Division EJB Architecture Design Strategies and Performance Optimizations.
Introduction to Enterprise JavaBeans. Integrating Software Development Server-side Component Model Distributed Object Architecture –CORBA –DCOM –Java.
EJB Design. Server-side components Perform –complex algorithms –high volume transactions Run in –highly available environment (365 days/year) –fault tolerant.
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
Java 2 – Enterprise Edition Kevin J. LaFata April 21, 2003 UM – St. Louis.
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.
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.
Ing. Ignacio Roqueta ARTech GeneXus and J2EE.
Advanced Java Session 7 New York University School of Continuing and Professional Studies.
1 Stateful Session Beans Stateless Session Beans Michael Brockway Sajjad Shami Northumbria University School of Computing, Engineering & Information Sciences.
Enterprise Java Bean Matt. 2 J2EE 3 J2EE Overview.
Enterprise JavaBeans. Lesson 1: Introduction to Server-Side Component Software.
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.
Java Server Pages A JSP page is a text-based document that contains two types of text: static template data, which can be expressed in any text-based format,
第十四章 J2EE 入门 Introduction What is J2EE ?
J2EE Structure & Definitions Catie Welsh CSE 432
Ch 2 – Application Assembly and Deployment COSC 617 Jeff Schmitt September 14, 2006.
1 Java EE Programming Enterprise JavaBeans. 2 Topics J2EE Overview Enterprise JavaBeans Overview Enterprise Entity Beans Case Study How to build them.
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.
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.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
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.
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.
©NIIT Introducing Enterprise JavaBeans (EJB) Lesson 1A / Slide 1 of 43J2EE Server Components Objectives In this lesson, you will learn about: The features.
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.
©NIIT Session Beans Lesson 1B/ Slide 1 of 37J2EE Server Components Objectives In this lesson, you will learn to: Describe the characteristics of session.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
Point Of Sale(POS) J2EE Application
Entity Bean Chuyên đề Lập trình Java & J2EE Chương 15
EJB (Enterprise Java Beans)
Introduction to J2EE Architecture
Java Messaging Service (JMS)
J2EE Application Development
Web-Services-based Systems Architecture, Design and Implementation
Introduction to Enterprise JavaBean
Distributed System Using Java 2 Enterprise Edition (J2EE)
Java Messaging Service (JMS)
Services-based Systems Architecture, Design and Implementation
Luca Simone Software Engineering 2 a.a. 2001/2002
Objectives In this lesson, you will learn to:
Objectives In this lesson you will learn about: Need for servlets
Understanding and Designing with EJB
Enterprise Java Beans Bina Ramamurthy 1/13/2019 B.Ramamurthy.
Component-based Applications
Introduction to Web Services
Component Technology Bina Ramamurthy 2/25/2019 B.Ramamurthy.
Understanding and Designing with EJB
Enterprise Java Beans Bina Ramamurthy 4/5/2019 B.Ramamurthy.
Enterprise Java Beans.
Seminarium on Component-based Software Engineering
Knowledge Byte In this section, you will learn about:
Presentation transcript:

Understanding and Designing with EJB B.Ramamurthy 11/29/2018

Review Request/Response Model Distributed Objects: stubs and skeleton providing location transparency Naming and Lookup: registry and binding Server-side technology: servlets (project1) Web applications: can be written entirely using Java Server Pages (static and dynamic content and data access can be provided); JSP is wrapper on servlet technology. Concept of initial context:The starting point for resolution of names for naming and directory operations. Data base access: using Java Data Base Connectivity 11/29/2018

When to use EJB For large scale applications: where resources and data are distributed. When the application is run on servers at many locations. Where scalability is critical. Where transactions are required to ensure data integrity When a variety of clients need to handled. 11/29/2018

Types of Enterprise Bean: Session Session bean: represents a single client inside the J2EE server. Session represents an interactive session. When a client terminates the session bean terminates/is no longer associated with the client. Stateful session bean: maintains a conversational state for the duration of a session. Ex: items reviewed in a session at some sites Stateless session bean: does not maintain a conversational state. Ex: computing a formula for a given value 11/29/2018

Types of Enterprise Bean: Entity An entity bean represents a business object in a persistent storage mechanism. Ex: customers, orders, and products. Each entity bean typically has an underlying table in a relational database (business data), and each instance of the bean corresponds to a row in that table. Transactional and recoverable on a server crash. 11/29/2018

Types of Enterprise Bean: Message-Driven A message driven bean is an enterprise bean that allows J2EE applications to process messages asynchronously. It acts as a JMS listener, which is similar to an event listener except that it receives messages instead of events. The messages can be sent by any J2EE component: an application client, another enterprise bean, or a web component, or a non-J2EE system using JMS. Retain no data or conversational state. 11/29/2018

Contents of an Enterprise Bean Interfaces: The remote and home interface for remote access. Local and local home accesses for local access. Enterprise bean class: Implements the methods defined in the above interfaces. Deployment descriptor: An XML file that specifies information about the bean such as its type, transaction attributes, etc. Helper classes: non-bean classes needed by the enterprise bean class such as utility and exception classes. 11/29/2018

Naming Conventions Item Syntax Example Enterprise Bean Name (DD) <name>EJB AccountEJB EJB JAR display name (DD) AccountJAR Enterprise bean class <name>Bean AccountBean Home interface <name>Home AccountHome Remote interface <name> Account Local home interface Local<name>Home LocalAccountHome Local interface Local<name> LocalAccount Abstract Schema (DD) 11/29/2018

The life cycles of enterprise beans An enterprise bean goes through various stages during its lifetime. Each type has different life cycle. 11/29/2018

Session bean 11/29/2018

Entity and Message-driven Bean Lifecycle 11/29/2018

Designing an application Start with Remote interface methods. For completion write the Home interface. Implement these methods in a (session) bean class. Update build.xml “ant” file and compile using ant <target> Use the deploy tool to deploy the application on your j2EE server and set up the configuration. Write a client (preferably a web client) to test your enterprise application. Lets go through converter application. Your assignment is to make it a more meaningful and useful converter. 11/29/2018