IBD Intergiciels et Bases de Données

Similar documents
Outline. Project Goal. Overview of J2EE. J2EE Architecture. J2EE Container. San H. Aung 26 September, 2003

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1

Chapter 6 Enterprise Java Beans

Oracle 10g: Build J2EE Applications

IBD Intergiciels et Bases de Données

J2EE - Version: 25. Developing Enterprise Applications with J2EE Enterprise Technologies

Java Training For Six Weeks

Overview p. 1 Server-side Component Architectures p. 3 The Need for a Server-Side Component Architecture p. 4 Server-Side Component Architecture

INTRODUCTION TO Object Oriented Systems BHUSHAN JADHAV

presentation DAD Distributed Applications Development Cristian Toma

Multi-tier architecture performance analysis. Papers covered

EJB ENTERPRISE JAVA BEANS INTRODUCTION TO ENTERPRISE JAVA BEANS, JAVA'S SERVER SIDE COMPONENT TECHNOLOGY. EJB Enterprise Java

J2EE Application Server. EJB Overview. Java versus.net for the Enterprise. Component-Based Software Engineering. ECE493-Topic 5 Winter 2007

WHAT IS EJB. Security. life cycle management.

Component-Based Software Engineering. ECE493-Topic 5 Winter Lecture 26 Java Enterprise (Part D)

Building the Enterprise

Introduction. Enterprise Java Instructor: Please introduce yourself Name Experience in Java Enterprise Edition Goals you hope to achieve

Enterprise JavaBeans (I) K.P. Chow University of Hong Kong

SPEC Enterprise Java Benchmarks State of the Art and Future Directions

In the most general sense, a server is a program that provides information

Oracle WebLogic Server 11g: Administration Essentials

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

Implementing a Web Service p. 110 Implementing a Web Service Client p. 114 Summary p. 117 Introduction to Entity Beans p. 119 Persistence Concepts p.

Developing Applications with Java EE 6 on WebLogic Server 12c

Enterprise JavaBeans. Layer:01. Overview

Java Enterprise Edition

CPET 581 E-Commerce & Business Technologies. Topics

Enterprise Java Unit 1-Chapter 2 Prof. Sujata Rizal Java EE 6 Architecture, Server and Containers

J2EE Web Development 13/1/ Application Servers. Application Servers. Agenda. In the beginning, there was darkness and cold.

PSD1B Advance Java Programming Unit : I-V. PSD1B- Advance Java Programming

COURSE 9 DESIGN PATTERNS

index_ qxd 7/18/02 11:48 AM Page 259 Index

/ / JAVA TRAINING

JAVA & J2EE UNIT -1 INTRODUCTION

Goal. Outline. Outline. J2EE architecture. Enterprise JavaBeans. J2EE Performance Scalability and Clustering Part 1

Improving Data Access of J2EE Applications by Exploiting Asynchronous Messaging and Caching Services

Course Content for Java J2EE

Projects. How much new information can fit in your brain? Corporate Trainer s Profile TECHNOLOGIES

NetBeans IDE Field Guide

Deccansoft Software Services. J2EE Syllabus

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

Advanced Java Programming

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand)

Oracle EXAM - 1Z Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam. Buy Full Product.

3C05 - Advanced Software Engineering Thursday, April 29, 2004

A Gentle Introduction to Java Server Pages

Data Management in Application Servers. Dean Jacobs BEA Systems

Application Server Evaluation Method

CMP 436/774. Introduction to Java Enterprise Edition. Java Enterprise Edition

SUN Sun Certified Enterprise Architect for J2EE 5. Download Full Version :

Enterprise JavaBeans, Version 3 (EJB3) Programming

Web Design and Applications

ive JAVA EE C u r r i c u l u m

Java EE 6: Develop Business Components with JMS & EJBs

COURSE DETAILS: CORE AND ADVANCE JAVA Core Java

The team that wrote this redbook

13. Databases on the Web

Application Servers in E-Commerce Applications

THIS IS ONLY SAMPLE RESUME - DO NOT COPY AND PASTE INTO YOUR RESUME. WE ARE NOT RESPONSIBLE Name: xxxxxx

Appendix A - Glossary(of OO software term s)

1Z Oracle. Java Enterprise Edition 5 Enterprise Architect Certified Master

Accurate study guides, High passing rate! Testhorse provides update free of charge in one year!

Borland Optimizeit Enterprise Suite 6

Java EE Patterns 176

Java EE 7: Back-End Server Application Development

Exam Questions 1Z0-850

WebSphere 4.0 General Introduction

Middleware and Web Services Lecture 3: Application Server

status Emmanuel Cecchet

1Z Oracle. Java Platform Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert

Rational Application Developer 7 Bootcamp

Introduction to componentbased software development

Oracle9iAS Tech nicaloverview

Essential Software Architecture

Module 3 Web Component

Enterprise Java Technologies (Part 1 of 3) Component Architecture. Overview of Java EE. Java Servlets

Distributed Systems. Messaging and JMS Distributed Systems 1. Master of Information System Management

Developing Java TM 2 Platform, Enterprise Edition (J2EE TM ) Compatible Applications Roles-based Training for Rapid Implementation

Chapter 10 Web-based Information Systems

Exam Questions 1Z0-895

Understanding and Designing with EJB

Introduction To Web Architecture

com Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/-

(9A05803) WEB SERVICES (ELECTIVE - III)

BEAWebLogic. Server. Introduction to WebLogic Server and WebLogic Express. Version 8.1 Revised: June 28, 2006 Part Number:

1Z Java SE 5 and 6, Certified Associate Exam Summary Syllabus Questions

Application Servers G Session 11 - Sub-Topic 2 Using Enterprise JavaBeans. Dr. Jean-Claude Franchitti

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

Contents at a Glance

Fast Track to Java EE 5 with Servlets, JSP & JDBC

PLATFORM TECHNOLOGY UNIT-5

4.1 The Life Cycle of a Servlet 4.2 The Java Servlet Development Kit 4.3 The Simple Servlet: Creating and compile servlet source code, start a web

Advanced Topics in Operating Systems

Client/Server-Architecture

What we need. Agenda. What s J2EE. Challenges of Enterprise Application Development

JVA-163. Enterprise JavaBeans

Mastering BEA WebLogic Server Best Practices for Building and Deploying J2EE Applications

~ Ian Hunneybell: CBSD Revision Notes (07/06/2006) ~

Oracle Fusion Middleware 11g: Build Applications with ADF I

Eclipse Java Ejb 3.0 Tutorial For Beginners With Examples Pdf

Transcription:

Overview of lectures and practical work IBD Intergiciels et Bases de Données Multi-tier distributed web applications Fabien Gaud, Fabien.Gaud@inrialpes.fr http://www-ufrima.imag.fr/ Placard électronique M1 Info IBD Lectures Introduction to distributed systems and middleware RMI-based distributed systems Servlet-based distributed systems Introduction to multi-tier distributed web applications Practical work Programming distributed systems with RMI Project on multi-tier distributed web applications F. Gaud Distributed systems & Middleware 2 Client Server Motivations Processing a request on the server may successively involve several types of logic: Computer 1 Execution entity (process 1) Computer 2 Execution entity (process 2) 2. procedure execution Data access logic Example: read data from a persistent storage (e.g. a database) Business logic Example: use the read data to perform any application-specific processing Presentation logic Example: use the obtained result to build a user-friendly response to the client F. Gaud Distributed systems & Middleware 3 F. Gaud Distributed systems & Middleware 4

Example 1 Example 1 2. Processing F. Gaud Distributed systems & Middleware 5 F. Gaud Distributed systems & Middleware 6 Example 2 Example 3 2. Processing 2. Processing F. Gaud Distributed systems & Middleware 7 F. Gaud Distributed systems & Middleware 8

Motivations Overview of the multi-tier architecture These types of logic may be more or less heavy in terms of processing time A unique server that hosts multiple types of logic may suffer from scalability issues in case of heavy workload (#concurrent web clients) Computer 0 Computer 1 Computer 2 Computer 3 Solution: Separate the different types of logic in different servers Multi-tier architecture Web tier Business tier Data access tier F. Gaud Distributed systems & Middleware 9 F. Gaud Distributed systems & Middleware 10 Multi-tier architecture Multi-tier architecture (2) Application servers Goal: Simplify/Speed up business application development Multi-tiers architecture Host applications and provide them with services (persistence, security,...) Java Enterprise Edition (formerly J2EE) Developed by SUN since 1997 Based on Java Many commercial/free implementations which may follow JEE specifications Bea WebLogic, IBM Websphere, JBoss, Jonas,... F. Gaud Distributed systems & Middleware 11 Web tier Receives requests from web clients Runs web components May forward requests to the business tier Returns web documents as responses (e.g. static HTML pages or dynamically generated web pages) Business tier Receives requests from the web tier (may also be called directly) Runs business components May forward requests to the data access tier (through JDBC) Data access tier Runs a database server Receives requests from the business tier F. Gaud Distributed systems & Middleware 12

Multi-tier architecture (3) JEE multi-tier systems Web components JEE web components are either servlets or JSP pages. Some notes about JSP Goal : Allows to build web responses in such a way that the static part is separated from the dynamic part For the static parts of the web response, write regular HTML For the dynamic parts of the web response, enclose code for the dynamic parts using special tags How it works A JSP page automatically gets converted to a normal Servlet The static HTML is printed to the output stream associated with the servlet's service method while the dynamic part correspond to Java code Build is performed automatically F. Gaud Distributed systems & Middleware 13 F. Gaud Distributed systems & Middleware 14 A JSP example <%! private int counter = 0; %> <HTML> <HEAD><TITLE>Hello</TITLE></HEAD> <BODY> <H1> Hello <% counter++; String pname; pname = request.getparameter("name"); if (pname== null) { out.println("world"); else { %> </H1> </BODY> </HTML> Mister <%=pname%> <% // fin du else %> F. Gaud Distributed systems & Middleware 15 JEE multi-tier systems Business components Meets the needs of a particular business domain Ex: banking, retail, finance,... There are three kinds of enterprise beans: session beans, entity beans, and message-driven beans Managed by an EJB container Provides non-functional services Lifecycle management Persistence Security Transactions... EJB may be distributed EJB are invoked through different protocols (ex: RMI) F. Gaud Distributed systems & Middleware 16

JEE multi-tier systems Entity Bean example Business components Session bean Represents a transient conversation with a client (stateful or stateless) When the client finishes executing, the session bean and its data are gone Front-end to entity beans Entity bean Represents persistent data stored in the database. Persistence may be managed by the bean or by the container Concurrency is managed by the container Message-driven bean Combines features of a session bean and a Java Message Service (JMS) message listener. Allowing a business component to receive JMS messages asynchronously. @Entity public class Facture { @Id private String numfact; private Client client; public Facture() { public Facture(String numfact) { this.numfact = numfact; public void setmontant(double montant) { this.montant = montant; public double getmontant( ) { return montant; @ManyToOne public Client getclient( ) { return client; public void setclient(client client) { this.client = client; F. Gaud Distributed systems & Middleware 17 F. Gaud Distributed systems & Middleware 18 Session Bean example A setup example @Stateless @Remote public class FacturationBean implements Facturation { JDBC DBMS Oracle @PersistenceContext private EntityManager entitymanager = null; public void creerfacture(string numfact, double montant) { Facture fact = new Facture(numfact); fact.setmontant(montant); entitymanager.persist(fact); JEE application server (JOnAS) EJB RMI JDBC Servlet container (Tomcat) RMI / JMS/ public Facture getfacture(string numfact) { return entitymanager.find(facture.class, numfact); WebServer (Apache) PHP CGI HTML Servlets JSP HTTP client F. Gaud Distributed systems & Middleware 19 F. Gaud Distributed systems & Middleware 20

Load balancing Incoming lectures and practical work on middleware Lectures Introduction to distributed systems and middleware RMI-based distributed systems Servlet-based distributed systems Introduction to multi-tier distributed Internet services Practical work Programming distributed systems with RMI Project on multi-tier distributed web applications Source: Jonas Documentation F. Gaud Distributed systems & Middleware 21 F. Gaud Distributed systems & Middleware 22 References This lecture is extensively based on: Sun Microsystems. The J2EE Tutorial http://java.sun.com/j2ee/1.4/docs/tutorial/ Jonas documentation http://wiki.jonas.objectweb.org/xwiki/bin/view/main/webhome Courses given by D. Donsez http://membres-liglab.imag.fr/donsez/cours/ Courses given by S.Bouchenak http://sardes.inrialpes.fr/~bouchena/ Courses given by R.Lachaize http://sardes.inrialpes.fr/~rlachaiz Courses given by P.Y. Gibello F. Gaud Distributed systems & Middleware 23