Distributed System Using Java 2 Enterprise Edition (J2EE)

Slides:



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

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.
Distributed System Using Java 2 Enterprise Edition (J2EE) B.Ramamurthy.
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
Layers & Tiers Umair Javed Lec - 41.
1 Build a Web Application on J2EE. 2 J2EE Scenario Client – Web Server – EIS Resources Client – Web Server – EIS Resources Client – Application Server.
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.
JMS Java Message Service Instructor Professor: Charles Tappert By Student: Amr Fouda.
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
Nikolaos Korfiatis The Java 2 Enterprise Edition Platform Dept. of Management & Technology-Athens University of Economics and Business Java 2 Platform.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
CS 483 Enterprise and Web Application Programming
Introduction to J2EE Dr. N. A. Joshi.
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
INTRODUCING THE JAVA EE PLATFORM Ch-5. Introduction Java is a  platform-independent programming language  secure and robust applications  may run on.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
Introduction to Java EE (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.
Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.
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.
Notes of J2EE Tutorial Matt Tsai. 2 Outline Chapter 1: Overview Chapter 1: Overview Chapter 2: Understanding XML Chapter 2: Understanding XML Chapter.
CS 493/693: Distributed Systems Programming V. “Juggy” Jagannathan CSEE, West Virginia University March 21, 2005.
Chemical Toxicity and Safety Information System Shuanghui Luo Ying Li Jin Xu.
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.
Introduction to J2EE Architecture Portions by Kunal Mehta.
第十四章 J2EE 入门 Introduction What is J2EE ?
Enterprise Java v120131Intro to JavaEE1 Java EE 5 TM Introduction.
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
Java 2 Enterprise Edition Presented by: Reem Osama Shehata Supervised by: Dr. Sherif Aly 16 th March 2006.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
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.
XML and Web Services (II/2546)
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.
What is J2EE Platform The Java 2 Platform Enterprise Edition (J2EE) defines the standard for developing multitier enterprise applications.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
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.
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.
Alan L. Batongbacal CS 4244 / 01 Nov 2000
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.
Apache Struts Technology A MVC Framework for Java Web Applications.
Intro to J2EE Concepts Mimi Opkins Fall 2016 CECS493.
J2EE Platform Overview (Application Architecture)
EJB (Enterprise Java Beans)
Introduction to J2EE Architecture
Enterprise Application Architecture
J2EE Application Development
Distributed System Using Java 2 Enterprise Edition (J2EE)
Understanding and Designing with EJB
JavaServer Faces: The Fundamentals
Enterprise Java Beans Bina Ramamurthy 1/13/2019 B.Ramamurthy.
Component-based Applications
Component Technology Bina Ramamurthy 2/25/2019 B.Ramamurthy.
Understanding and Designing with EJB
Enterprise Java Beans Bina Ramamurthy 4/5/2019 B.Ramamurthy.
Intro to J2EE Concepts.
Presentation transcript:

Distributed System Using Java 2 Enterprise Edition (J2EE) B.Ramamurthy

Introduction Sun Microsystems provides specifications for a comprehensive suite of technologies to solve large scale distributed system problems. This suite is the Java 2 Enterprise Edition, commonly known as J2EE. In this discussion we will discuss the architecture of J2EE and how it can be used to develop distributed multi-tiered applications.

J2EE Suite J2EE (Java2 Enterprise Edition) offers a suite of software specification to design, develop, assemble and deploy enterprise applications. It provides a distributed, component-based, loosely coupled, reliable and secure, platform independent and responsive application environment.

J2EE Suite (contd.) Core technology: Container infrastructure, language and environment support XML and services technology The Java API for Webservices (JAX-WS) The Java API for XML-based RPC (JAX-RPC) SOAP with Attachments API for Java (SAAJ) The Java API for XML Registries (JAXR) Web Technology Java Servlets JavaServer Pages JavaServer Pages Standard Tag Library Enterprise Java Bean (EJB) technology Session beans Entity beans Enterprise JavaBeans Query Language Plain old java objects (POJO) Platform services Security Transactions Resources Connectors Java messaging

Distributed Multi-tiered Applications Services, clients (people and application) and data are distributed geographically across many platforms and many machines. Multiple tiers: Client-tier (browser or client-application) Web-tier (web-server: Java Server Pages) Business-tier (logic; Examples: Enterprise Java Beans) Enterprise-Information-System (EIS) tier (database)

J2EE-based Application The J2EE APIs enable distributed systems and applications through the following: Unified application model across tiers with enterprise beans Simplified response and request mechanism with JSP pages and servlets Reliable security model with JAAS XML-based data interchange integration with JAXP Simplified interoperability with the J2EE Connector Architecture Easy database connectivity with the JDBC API Enterprise application integration with message-driven beans and JMS, JTA, and JNDI Java persistent API;

J2EE Technology Architecture html Web clients Application clients IIOP, others Java Server pages Servlets Enterprise Java Beans Components Server platform JTS JMAPI JNDI JMS JAXP JDBC JAAS …

Enterprise Application Model (2007)

Enterprise model (J2EE) today

J2EE clients Web clients Application clients Dynamic web pages with HTML, rendered by web browsers. Can include applets. Communicates with server typically using HTTP. Application clients User interface using GUI components such as Swing and AWT. Directly accesses the business logic tier.

Web-tier Components Client can communicate with the business tier either directly or through servlets ot JSP that are located in the web-tier. Web-tier can help in pre-processing and allows distribution of the functionality. Servlets are special classes to realize the request-response model (get, post of HTTP). JSP is a developer-friendly wrapper over the servlet classes.

Business-tier Components This is defined by the logic that pertains to the (business) application that is being developed. Enterprise Java Beans (EJB) can be used to implement this tier. This tier receives the data from the web-tier and processes the data and sends it to the EIS-tier and takes the data from the EIS and sends it to the web-tier.

Enterprise Information System (EIS) Tier In general this corresponds to the database (relational database) and other information management system. The other information management systems may include Enterprise Resource Planning (ERP) and legacy system connected through open database connectivity.

Enterprise Java Bean(EJB) An enterprise bean is a server-side component that contains the business logic of an application. At runtime, the application clients execute the business logic by invoking the enterprise bean's methods. Main goal of Enterprise Java Bean (EJB) architecture is to free the application developer from having to deal with the system level aspects of an application. This allows the bean developer to focus solely on the logic of the application.

Enterprise Java Bean (EJB) (contd.) Deployable unit of code. At run-time, an enterprise bean resides in an EJB container. An EJB container provides the deployment environment and runtime environment for enterprise beans including services such as security, transaction, deployment, concurrency etc. Process of installing an EJB in a container is called EJB deployment.

Enterprise Application with many EJBs WebClient EJB1 EJB5 EJB3 EJB6 ApplClient Lets consider a shopping front application and figure out the possible components (EJBs)

Roles in EJB Development Bean developer: Develops bean component. Application assembler: composes EJBs to form applications Deployer: deploys EJB applications within an operation environment. System administrator: Configures and administers the EJB computing and networking infrastructure. EJB Container Provider and EJB server provider: Vendors specializing in low level services such as transactions and application mgt.

Types of Enterprise Java Beans Plain old java beans Session beans Entity Beans (for database access) Plain old java objects (POJO)

Session Beans For transient functions Represents “conversational” state Typically one per request Data is non-persistent Lifetime is limited by the client’s: once the client exits, the session bean and data are gone. Simple and easy to program. Light-weight.

Entity Bean “Transactional” in behavior Can be shared among clients Persistent: data exists permanently after client quits. Corresponds to a row a relational database. The persistence (storing into the database) can be automatically done by the “container”

Entity Bean (contd.) Data is at the heart of most business applications. In J2EE applications, entity beans represent the business objects that need persistence (need to be stored in a database.) You have choice of bean-managed persistence (BMP) and container-managed persistence (CMP). In BMP you write the code for database access calls. This may be additional responsibility but it gives control to the bean developer.

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

Life Cycle Differences Session Bean Object state: Maintained by container Object Sharing: No sharing: per client State Externalization: State is inaccessible to other programs Transactions: Not recoverable Failure Recovery: Not guaranteed to survive failures Entity Bean Maintained by DB Shared by multiple client Accessible to other programs State changed transactionally and is recoverable. Survives failures and restored when the container restarts.

Session bean Does not Exist Ready create remove Does not Exist create passivate Ready Passive activate

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.

Container Services A container interfaces the programmatic components such as EJBs to the declarative components. Container services include security, transaction management, naming services, and remote connectivity. The fact that the J2EE architecture provides configurable services means that application components can behave differently based on where they are deployed. The concept of “deployable units” and “containers” where they can be deployed is central to J2EE. Tomcat, Glassfish are examples of application servers that play the role of a conatiner.

Compilation and Deployment Compilation (building the executables) uses build tool such as Apache Ant. The components of the various tiers are packaged: .jar, .war, .ear Declarative resources are added. A deploy tool or management tool is used to deploy the packaged units into a J2EE server (container). All these are automatically done by netbeans architecture.

Summary J2EE environment provides a framework for bundling together the components into an application and provide the applications necessary common services such as persistence, security, mail, naming and directory service etc. Browse through: http://java.sun.com/j2ee/faq.html http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/index.html#chapters