J2EE Overview ver 1.0Page 1 © Wipro Technologies Talent Transformation J2EE Overview.

Slides:



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

JNDI Java Naming Directory Interface JNDI is an API specified in Java that provides naming and directory functionality to applications written in Java.
Approaches to EJB Replication. Overview J2EE architecture –EJB, components, services Replication –Clustering, container, application Conclusions –Advantages.
An architecture for webb applications, J2EE
Introduction to Java 2 Enterprise Edition About myself –Neutrinos, Cancer Research, IT Applications Today’s topic: J2EE –Context –Advantages –Components.
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
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.
1. Introducing Java Computing  What is Java Computing?  Why Java Computing?  Enterprise Java Computing  Java and Internet Web Server.
Application Server Lecture Paulo Barroso Kris Carver Todd Kitterman Eric Silva.
Introduction to Remote Method Invocation (RMI)
Java 2 Platform, Enterprise Edition (J2EE). Source: Computer, August 2000 J2EE and Other Java 2 Platform Editions.
JMS Java Message Service Instructor Professor: Charles Tappert By Student: Amr Fouda.
Version # Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department of Defense © 1999 by Carnegie.
Enterprise Programming By J Pearce. Enterprise Software Sales HR Inventory Customer Support Shipping.
J2EE Kenneth M. Anderson CSCI Web Technologies October 3, 2001.
CS 483 Enterprise and Web Application Programming
CS6320 – J2EE L. Grewe MOTIVATION: E-commerce and Enterprise Computing Models Four models for e-commerce and enterprise computing: Four models for e-commerce.
© 2004 IBM Corporation BEA WebLogic Server Introduction and Training.
Distributed System Using Java 2 Enterprise Edition (J2EE)
EJB Overview Celsina Bignoli Distributed Business Applications Server DB Client DB Server DB.
Distributed Multitiered Applications The J2EE platform uses a multitiered distributed application model. Application logic is divided into components 1.
EJB. Component Characteristics An enterprise Bean typically contains business logic that operates on the enterprise’s data. An enterprise Bean’s instances.
Chapter 4: Core Web Technologies
Enterprise Java Beans CS-422. Application Servers In the late 1980s and though the mid 1990s a number of corporations (Broadvision, Netscape…) marketed.
HTTP client wide area network (Internet) HTTP proxy HTTP server HTTP gateway firewall HTTP tunnel Copyright Springer Verlag Berlin Heidelberg 2004.
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)
CS 493/693: Distributed Systems Programming V. “Juggy” Jagannathan CSEE, West Virginia University March 21, 2005.
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.
Enterprise Java Bean Matt. 2 J2EE 3 J2EE Overview.
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.
EJB Framework.  As we know, EJB is the center of the J2EE architecture that provides a sturdy framework for building enterprise applications. The major.
Message-Driven Beans and EJB Security Lesson 4B / Slide 1 of 37 J2EE Server Components Objectives In this lesson, you will learn about: Identify features.
第十四章 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.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
Databases JDBC (Java Database Connectivity) –Thin clients – servlet,JavaServer Pages (JSP) –Thick clients – RMI to remote databases –most recommended way.
1 Java EE Programming Enterprise JavaBeans. 2 Topics J2EE Overview Enterprise JavaBeans Overview Enterprise Entity Beans Case Study How to build them.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Spring Remoting Simplifying.
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.
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.
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.
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. Introduction Enterprise Java Beans is a specification for creating server- side scalable, transactional, multi-user secure enterprise-level applications.
RMI1 Remote Method Invocation Adapted from “Core Java 2” by Cay Horstmann.
J2EE Platform Overview (Application Architecture)
Java Messaging Service (JMS)
Java Messaging Service (JMS)
Distributed System Using Java 2 Enterprise Edition (J2EE)
Java Messaging Service (JMS)
Inventory of Distributed Computing Concepts
Component-based Applications
Enterprise Java Beans.
Knowledge Byte In this section, you will learn about:
Objectives In this lesson, you will learn about:
Presentation transcript:

J2EE Overview ver 1.0Page 1 © Wipro Technologies Talent Transformation J2EE Overview

J2EE Overview ver 1.0Page 2 © Wipro Technologies Talent Transformation Objectives In this session, you will learn to: Identify the characteristics of different Java Platforms Identify the challenges of an enterprise application Describe J2EE architecture Define the role of various J2EE technologies

J2EE Overview ver 1.0Page 3 © Wipro Technologies Talent Transformation Java 2 Editions

J2EE Overview ver 1.0Page 4 © Wipro Technologies Talent Transformation Issues in Enterprise Applications Transactions State management Multithreading Resource pooling Security

J2EE Overview ver 1.0Page 5 © Wipro Technologies Talent Transformation Java 2 Platform, Enterprise Edition J2EE RMIJNDIJDBCJavaMailServletsJSPJava IDLEJBJMSJTAConnectorsXML Java 2: Standard ed.

J2EE Overview ver 1.0Page 6 © Wipro Technologies Talent Transformation J2EE Architecture

J2EE Overview ver 1.0Page 7 © Wipro Technologies Talent Transformation J2EE Services Java Technology Web Servlets/ JSPs (HTML/ XML) Database Access Java DataBase Connectivity (JDBC™) Naming And Directory Java Naming and Directory Interface Messaging Java Message Service (JMS) Access JavaMail™ Protocol JavaIDL, Remote Method Invocation (CORBA compatible) Transaction Object Transaction Service (OTS), Java Transaction Service (JTS), Java Transaction API (JTA)

J2EE Overview ver 1.0Page 8 © Wipro Technologies Talent Transformation Naming Services Provide J2EE components with access to a JNDI naming environment –J2EE component locates its environment naming context using JNDI interfaces

J2EE Overview ver 1.0Page 9 © Wipro Technologies Talent Transformation Java Naming and Directory Interface A standard for Naming and directory services EJB strictly relies on JNDI for looking up distributed components across the network e.g. Novell’s NDS and the internet standard LDAP –Each one is accessed differently –Stores info in a proprietary way JNDI bridges the gap between different directory services: provides portable interface

J2EE Overview ver 1.0Page 10 © Wipro Technologies Talent Transformation JNDI Interface

J2EE Overview ver 1.0Page 11 © Wipro Technologies Talent Transformation Transaction Scenario... What’s Wrong with This Code? try { // Withdraw funds from account 1 } catch (Exception e) { // If an error occurred, do not proceed. return;}} try { // Otherwise, deposit funds into account 2 } catch (Exception e) { // If an error occurred, do not proceed, // and redeposit the funds back into account 1. return; }

J2EE Overview ver 1.0Page 12 © Wipro Technologies Talent Transformation Transaction Definition An atomic unit of work Can consist of multiple operations from multiple objects Example: withdrawing money from an account using an automatic teller machine Can support the following features: –Distribution across a network –Two - phase commits –Nested transactions

J2EE Overview ver 1.0Page 13 © Wipro Technologies Talent Transformation Transaction Participants Resource has transactional state –Example: Database connection Resource manager can commit and rollback –Example: JDBC driver Application server assists in managing usage of transactional resources by beans –Example: EJB server

J2EE Overview ver 1.0Page 14 © Wipro Technologies Talent Transformation Transaction Participants Transaction manager: –Controls state of transaction, two- phase commit –Coordinates/ controls all resource managers within transaction Transactional application obtains a limited access to the transaction manager: –Client application –Enterprise bean

J2EE Overview ver 1.0Page 15 © Wipro Technologies Talent Transformation Transactions and the ACID Properties As we have seen, exceptions are not enough for enterprise computing –Code is non- deterministic Transactions guarantee determinism Transactions give you four virtues, called the ACID properties: –Atomicity –Consistency –Isolation –Durability

J2EE Overview ver 1.0Page 16 © Wipro Technologies Talent Transformation Transaction Services J2EE transactions are flat J2EE platform implicitly handles many transaction details A Transaction is a unit of work that makes a set of guarantees about its execution

J2EE Overview ver 1.0Page 17 © Wipro Technologies Talent Transformation Java Transaction API (JTA) and Java Transaction Service (JTS) JTA: –High level transaction interface: EJB clients use JTA –Required to perform transactions in Java JTS: –Low-level transaction interface: EJB uses behind the scene –Makes possible multiple vendors to collaborate for distributed transactions

J2EE Overview ver 1.0Page 18 © Wipro Technologies Talent Transformation Service Technology Provide access to database, transactions, naming and directory services and enterprise information systems JDBC API Java Transaction API and Service Java Naming and Directory Interface Connector Architecture Communication Techniques –Internet protocols –RMI protocols –OMG protocols –Messaging technologies

J2EE Overview ver 1.0Page 19 © Wipro Technologies Talent Transformation Introduction to RMI Distributed Computing RPC RMI

J2EE Overview ver 1.0Page 20 © Wipro Technologies Talent Transformation Features of RMI Remote invocations of methods on objects in different JVM’s Simple to write reliable distributed applications RMI is transparent

J2EE Overview ver 1.0Page 21 © Wipro Technologies Talent Transformation RMI Architecture Client Program Stub RRL Transport Layer Server Program Skeleton Layer RRL

J2EE Overview ver 1.0Page 22 © Wipro Technologies Talent Transformation Writing a Simple RMI program Write the Remote Object program //Product.java import java.rmi.*; import java.rmi.server.*; interface Product extends Remote { public String getDescription() throws RemoteException; }

J2EE Overview ver 1.0Page 23 © Wipro Technologies Talent Transformation Writing a Simple RMI program 2) Write the Remote Server Program //ProductImpl.java import java.rmi.*; import java.rmi.server.*; public class ProductImpl extends UnicastRemoteObject implements Product {private String str; public ProductImpl(String d) throws RemoteException{ str = d; } public String getDescription() throws RemoteException{ return "Product Name : "+str; }

J2EE Overview ver 1.0Page 24 © Wipro Technologies Talent Transformation Writing a Simple RMI program 2) Write the Remote Server Program …contnd public static void main(String a[]) { try{ ProductImpl p1= new ProductImpl("Washing Machine"); ProductImpl p2= new ProductImpl("Microwave Oven"); Naming.rebind("wash",p1); Naming.rebind("oven",p2); }catch(Exception e){ System.out.println("ERROR: "+e); e.printStackTrace(); } }}

J2EE Overview ver 1.0Page 25 © Wipro Technologies Talent Transformation Writing a Simple RMI program 3) Write the Client program import java.rmi.*; import java.rmi.server.*; public class ProductClient { public static void main(String a[]){ try{ Product c1=(Product)Naming.lookup("wash"); Product c2=(Product)Naming.lookup("oven"); System.out.println(c1.getDescription()); System.out.println(c2.getDescription()); }catch(Exception e){System.out.println("Error: "+ e);} System.exit(0);}}

J2EE Overview ver 1.0Page 26 © Wipro Technologies Talent Transformation JavaMail The JavaMail API allows your applications to use capabilities JavaMail defines a set of interfaces to which you write your application code, and those interfaces shield your code from the specific protocols or mail service implementations used Based on JavaBeans Activation Framework (JAF) to encapsulate message data and to handle interactions with that data

J2EE Overview ver 1.0Page 27 © Wipro Technologies Talent Transformation Java Messaging Service JMS allows Java programs to exchange messages with other Java programs sharing a messaging system. Messaging systems are sometimes called Message- Oriented Middleware (MOM) JMS API enables communication that is : –Asynchronous –Reliable

J2EE Overview ver 1.0Page 28 © Wipro Technologies Talent Transformation Real Time Example Automobile manufacturer –The inventory component can send a message to the factory component when the inventory level for a product goes below a certain level, so the factory can make more cars. –The factory component can send a message to the parts components so that the factory can assemble the parts it needs. –The parts components in turn can send messages to their own inventory and order components to update their inventories and order new parts from suppliers. –Both the factory and parts components can send messages to the accounting component to update their budgets. –The business publishes updated catalog items to its sales force and web site.

J2EE Overview ver 1.0Page 29 © Wipro Technologies Talent Transformation JMS Architecture JMS provider –is a messaging product that implements the JMS interfaces and provides administrative and control features Administered objects –pre-configured JMS objects created by an administrator for the use of clients. JMS clients –the programs or components written in the Java programming language that produce and consume messages. Messages –the objects that communicate information between JMS clients.

J2EE Overview ver 1.0Page 30 © Wipro Technologies Talent Transformation Publish-Subscribe Messaging

J2EE Overview ver 1.0Page 31 © Wipro Technologies Talent Transformation Point- To-Point Messaging

J2EE Overview ver 1.0Page 32 © Wipro Technologies Talent Transformation Enterprise JavaBeans Enterprise JavaBeans is an architecture for component- based distributed computing: –Customizable at deployment time –Deployed on a compatible application server –Portable to other application servers Enterprise Beans are components of distributed transaction - oriented enterprise applications

J2EE Overview ver 1.0Page 33 © Wipro Technologies Talent Transformation Defining EJB Technology EJB servers provide core services to server components: –Transaction –Security –Concurrency –Naming –Persistence EJB technology enhances: –Simplified access to services –Portability of components across server platforms

J2EE Overview ver 1.0Page 34 © Wipro Technologies Talent Transformation Defining EJB Technology Is a server component specification (for vendors) Separates and defines integration of development stages: –Component creation –Application assembly –Application deployment

J2EE Overview ver 1.0Page 35 © Wipro Technologies Talent Transformation EJB Developer Roles

J2EE Overview ver 1.0Page 36 © Wipro Technologies Talent Transformation EJB Programming Paradigm Declarative programming and customizing

J2EE Overview ver 1.0Page 37 © Wipro Technologies Talent Transformation EJB Programming Paradigm Deploying

J2EE Overview ver 1.0Page 38 © Wipro Technologies Talent Transformation EJB Architecture Overview Uniform client access whether local or remote Home object is a factory for EJBs EJB object is the remote object for accessing EJBs

J2EE Overview ver 1.0Page 39 © Wipro Technologies Talent Transformation EJB Architecture Overview

J2EE Overview ver 1.0Page 40 © Wipro Technologies Talent Transformation EJB Server Services: –Transaction support –Data access –System resource –Namespace Industry support: –Application/ middleware servers –Database servers

J2EE Overview ver 1.0Page 41 © Wipro Technologies Talent Transformation EJB Container Can contain multiple Bean classes or homes –Often created using code generation by tools –Is normally provided by EJB server vendor Is not visible to the client Is implemented in different ways by different vendors

J2EE Overview ver 1.0Page 42 © Wipro Technologies Talent Transformation EJB Container Provides some standard services: –Persistence –Transaction control –Security –EJB instance lifecycle management –EJB instance identification

J2EE Overview ver 1.0Page 43 © Wipro Technologies Talent Transformation 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

J2EE Overview ver 1.0Page 44 © Wipro Technologies Talent Transformation

J2EE Overview ver 1.0Page 45 © Wipro Technologies Talent Transformation Remote Interface Interface is provided by bean developer. Implementation is provided by container tools, which include: –Stubs and skeletons –The EJB Object

J2EE Overview ver 1.0Page 46 © Wipro Technologies Talent Transformation 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 vendor tool Each business method has a corresponding wrapper method in the EJB Object –Wrapper method implements container- provided services

J2EE Overview ver 1.0Page 47 © Wipro Technologies Talent Transformation Stubs and Skeletons Stub is downloaded from server Communication between stub and skeleton can be proprietary, yet EJB code is still portable

J2EE Overview ver 1.0Page 48 © Wipro Technologies Talent Transformation Types of EJBs

J2EE Overview ver 1.0Page 49 © Wipro Technologies Talent Transformation J2EE Components and Containers

J2EE Overview ver 1.0Page 50 © Wipro Technologies Talent Transformation Summary In this session, you learnt to: Identify characteristics of different Java Platforms Identify the challenges of an enterprise application Describe J2EE architecture Define the role of various J2EE technologies

J2EE Overview ver 1.0Page 51 © Wipro Technologies Talent Transformation

J2EE Overview ver 1.0Page 52 © Wipro Technologies Talent Transformation

J2EE Overview ver 1.0Page 53 © Wipro Technologies Talent Transformation

J2EE Overview ver 1.0Page 54 © Wipro Technologies Talent Transformation

J2EE Overview ver 1.0Page 55 © Wipro Technologies Talent Transformation References