Java Enterprise Edition

Similar documents
Developing Applications with Java EE 6 on WebLogic Server 12c

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

Deccansoft Software Services. J2EE Syllabus

Chapter 6 Enterprise Java Beans

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

Enterprise JavaBeans, Version 3 (EJB3) Programming

Java EE 7: Back-End Server Application Development

CO Java EE 7: Back-End Server Application Development

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

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

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics

Fast Track to EJB 3.0 and the JPA Using JBoss

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

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Java EE 6: Develop Business Components with JMS & EJBs

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.

Oracle 10g: Build J2EE Applications

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

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

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

Data Management in Application Servers. Dean Jacobs BEA Systems

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

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

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

Java SE7 Fundamentals

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

Oracle Fusion Middleware 11g: Build Applications with ADF I

TOPLink for WebLogic. Whitepaper. The Challenge: The Solution:

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

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

Migrating traditional Java EE applications to mobile

Oracle Fusion Middleware 11g: Build Applications with ADF I

Appendix A - Glossary(of OO software term s)

SCBCD EXAM STUDY KIT. Paul Sanghera CX JAVA BUSINESS COMPONENT DEVELOPER CERTIFICATION FOR EJB MANNING. Covers all you need to pass

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

presentation DAD Distributed Applications Development Cristian Toma

NetBeans IDE Field Guide

Borland Application Server Certification. Study Guide. Version 1.0 Copyright 2001 Borland Software Corporation. All Rights Reserved.

CO Java EE 6: Develop Database Applications with JPA

"Charting the Course... Mastering EJB 3.0 Applications. Course Summary

Courses For Event Java Advanced Summer Training 2018

Enterprise Java Security Fundamentals

"Web Age Speaks!" Webinar Series

Java EE Architecture, Part Two. Java EE architecture, part two 1

Shale and the Java Persistence Architecture. Craig McClanahan Gary Van Matre. ApacheCon US 2006 Austin, TX

JVA-163. Enterprise JavaBeans

Distributed Multitiered Application

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

Exam Actual. Higher Quality. Better Service! QUESTION & ANSWER

Vendor: SUN. Exam Code: Exam Name: SUN Certified ENITRPRISE ARCHITECT FOR J2EE(tm)TECHNOLOGY. Version: Demo

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

ITdumpsFree. Get free valid exam dumps and pass your exam test with confidence

Client/Server-Architecture

Java SE 8 Fundamentals

Building the Enterprise

Notes. Submit homework on Blackboard The first homework deadline is the end of Sunday, Feb 11 th. Final slides have 'Spring 2018' in chapter title

Chapter 1 Introducing EJB 1. What is Java EE Introduction to EJB...5 Need of EJB...6 Types of Enterprise Beans...7

Pro JPA 2. Mastering the Java Persistence API. Apress* Mike Keith and Merrick Schnicariol

Fast Track to Java EE

Object-relational mapping EJB and Hibernate

Multi-tier architecture performance analysis. Papers covered

Problems in Scaling an Application Client

Java Training For Six Weeks

Exam Questions 1Z0-895

Asynchrone Kommunikation mit Message Driven Beans

Enterprise JavaBeans 3.1

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

Table of Contents. Introduction... xxi

foreword to the first edition preface xxi acknowledgments xxiii about this book xxv about the cover illustration

Using JNDI from J2EE components

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

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

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Web Design and Applications

Application Servers in E-Commerce Applications

Understanding and Designing with EJB

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

object/relational persistence What is persistence? 5

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1

It Is a Difficult Question! The Goal of This Study. Specification. The Goal of This Study. History. Existing Benchmarks

Course Content for Java J2EE

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

Oracle9iAS Tech nicaloverview

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

Master Thesis An Introduction to the Enterprise JavaBeans technology and Integrated Development Environments for implementing EJB applications

<Insert Picture Here> Productive JavaEE 5.0 Development

Enterprise Java and Rational Rose -- Part I

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

Essential Software Architecture

J2EE Access of Relational Data

Hibernate Interview Questions

This course is intended for Java programmers who wish to write programs using many of the advanced Java features.

Advanced Topics in Operating Systems

Web Application Development Using Spring, Hibernate and JPA

J2EE Interview Questions

Oracle Exam 1z0-895 Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam Version: 14.0 [ Total Questions: 90 ]

Designing a Distributed System

Web Presentation Patterns (controller) SWEN-343 From Fowler, Patterns of Enterprise Application Architecture

Enterprise JavaBeans. Layer:01. Overview

Transcription:

Java Enterprise Edition

The Big Problem Enterprise Architecture: Critical, large-scale systems Performance Millions of requests per day Concurrency Thousands of users Transactions Large amounts of data Distributed Resource location Communications Security risks Solve once Enterprise Java Beans Shared container handles system services Components provide application specific services Standard container/component interface

Container Concept A runtime environment for managing components Examples of Container Concept: Enterprise Container Containing EJB Web Container Instantiates and manages the beans Containing Provides Servlets system-level services Applet Container Containing Applets Transaction management Security Persistence of the bean Remote access to the bean Lifecycle management of the bean Database-connection pooling Instance pooling for the beans interface Client

Java Editions New web profile to handle less demanding applications Uses profiles & configurations to handle device capabilities Java Mobile Edition Optional Packages JEE Web Profile Optional Packages Personal Profile MIDP JSE CDC CLDC Card API Java Virtual Machine KVM CardVM

Versions Java Enterprise Edition reputation for complexity Complex interfaces that all beans had to implement Complex configuration using XML Complex look-up of components & services Various frameworks sprung up to simplify development E.g. Spring Java EE 6 and EJB 3.1 Beans are POJOs Configuration using annotations JNDI provides easier look-up Better support for REST

Enterprise Application Layers The Client UI The presentation logic Interacting with end-users. The business logic The system services security, caching, logging, transactions The data access logic User Interface Layer Beans Container Persistence

3-Tier Applications: Remote Object Method Call/Response SQL Database Server Client fat client Remote Object-based Business logic defined through object interface Client/server protected from changes Communication by SOAP/Web Services, RMI, CORBA Concurrency / transaction control in Server

3-Tier Applications: Browser-based SQL HTTP request/ response Database Server Client Browser Browser-based Business logic and data model handled on server Dynamic HTML generation (Servlet/JSP, ASP) Multiple client types including mobile phones

Java Enterprise Edition Technologies Servlet JSP JSF Java Server Faces Component-based UI development Support for Web services Synchronous & asynchronous (polling & callback) Support for XML XML Java object conversion EJB Enterprise JavaBeans Messaging API (JMS)

Enterprise Java Beans A reusable, portable component EJB methods encapsulate business logic. e.g a method to update customer data in a database. Developed as POJOs, or Plain Old Java Objects, Communicate with container by metadata annotations Runs in a container Developer focuses on the business logic Container handles common complicated issues Transaction support, security, and remote object access Key concepts A Bean (Java coffee bean!) extra information about something e.g. the date a picture was taken Not regarded as Enterprise Beans in EJB 3 Session Beans, Message Beans, Entity Classes

What Does The Container Support? Lifecycle Manage threads, object activation & object destruction. State Management. Beans do not explicitly save or restore conversational object state between method calls. Security. Perform all security checking Beans do not explicitly authenticate users or check authorization levels. Transactions. Manage start, enrolment, commitment & rollback of transactions Persistence. Beans so not explicitly handle retrieving or storing data

Summary Java EE provides services at all levels UI / business logic / persistence Common enterprise application services Transactions, persistence, concurrency, security Container provides services to components Lifecycle management, etc. Use configuration information to link components in Web container, EJB, applet container Enterprise beans capture business logic Prefer POJO: Plain Old Java Objects

Session Beans Associated with a client performing actions on the server. E.g. stages in the business process: handle application" Stateful Maintain information across calls during bean lifetime Stateless No information retained from one call to the next Typically are not persistent short life interface Can participate in transactions. Client Don't survive server crashes. E.g. an EJB serving Web pages & tracking the user's path Beans in container, responding to requests When the user leaves the site, or after a specified idle time, the session object will be destroyed. A session bean is like a receptionist. Takes requests, responds to some, passes requests to others

Stateless session beans Use the annotation @Stateless on the bean. No internal state. Each stateless business method call is independent E.g. calculating taxes or shipping charges. Easy for container to manage. Can provide beans from a pool Can share beans across clients

Stateful session bean Maintains a conversational state across method calls E.g. online shopping cart holding customer details & purchases Transient The state is lost when the session ends or the system crashes Management A single bean for a single client maintain its state After any method annotated @Remove the state is discarded. Once the client finishes interacting with the enterprise bean, and the EJB container removes the enterprise bean, the session for the bean ends and all state data for the bean is discarded.

Entity Classes Manages persistent data and identified by a primary key Specified by the @Entity annotation. Represent persistent data from the database, E.g. an employee record in an employee table. Sharable across multiple clients. All fields not marked with the @Transient are persistent. Create object/relational mappings using annotations. To map a class's empid property to the EMPNO attribute of the Employees table, annotate it: @Table(name="Employees") and @Column(name="EMPNO").

Entity Classes 2 Represent business logic for a persistent entity Like tuples (records) in a relational database Persistent The state exists beyond the life of the application that created it. Allow shared access by multiple clients. Concurrency is handled by the container. Have primary keys Primary-key classes identify an instance of an entity bean. May participate in relationships Interfaces are used to manage relationships between beans. Can participate in transactions Beans can specify the transactional properties for their interaction.

Entity Classes and ORM Insert, update, select, and remove data Bean-Managed Persistence (BMP) The programmer writes code to access the data source. More flexible (but more work) Container-Managed Persistence (CMP) Container handles database access for the entity bean. The bean isn t tied to a specific data source Object Relation Management The entity bean can be deployed in different containers and with different data-sources. The link to the data source is set up at configuration time

Entities are POJOs. No special methods. Java Persistence API Standardized object-relational mapping Annotations or XML descriptors can specify ORM mapping The specification defines default values for them. Support for inheritance and polymorphism. Queries are polymorphic: affect ancestor and descendents. Support for queries Java Persistence Query Language The native query language of the underlying database.

Java Persistence API 2 Support for pessimistic locking Locks records to prevent collision Slow if collisions infrequent Support for optimistic locking Avoids locks but handles failure due to collision Better improve performance if collisions infrequent EntityManager API. A standard EntityManager API to perform Create Read Update Delete (CRUD) operations that involve entities.

Message-Driven Beans Allow applications to use asynchronous messages The container handles most of the administration. Two models for delivering messages (queue, topic) Annotated @MessageDriven. Implement the javax.jms.messagelistener interface Given messages through its standard callback method onmessage(javax.jms.message param) param can be cast to TextMessage, ObjectMessage, StreamMessage,

Queues: Point to point Messaging Models Can have many senders & receivers Message consumed by one bean Topics: Publish-Subscribe Can have many senders & receivers Message consumed by all subscribing beans subscriber sender Msg publisher Msg handler queue Msg Topic subscriber Msg Msg handler Msg sender Msg subscriber Msg

EJB Advantages Beans can be deployed in any vendor s container A bean can rely on the container to manage lifecycle, persistence, transaction, distribution, and security. Transaction semantics are defined declaratively In annotations rather than programmatically. Scalability Can distribute beans across multiple servers Client-Location Transparency Client programs don t need to know the location of the EJBs. Can change data sources easily Reusability Business logic can be written once and reused

Session Beans Stateless Summary Provide a response to a request Stateful Keep information from one request to next Message Beans Asynchronous message handling Entity Classes Each instance corresponds to a row in a table Container looks after persistence Reading and writing to/from disk

Links Simplify enterprise Java development with EJB 3.0, Part 1 http://www.javaworld.com/javaworld/jw-08-2005/jw-0815-ejb3.html?page=1 Simplify enterprise Java development with EJB 3.0, Part 2 http://www.javaworld.com/javaworld/jw-09-2005/jw-0912-ejb.html Oracle resources www.oracle.com/technology/tech/java/ejb30.html Java EE5 Tutorial java.sun.com/javaee/5/docs/tutorial/doc/bnaad.html