Java 2 Platform, Enterprise Edition (J2EE) Bruno Souza Java Technologist, Sun Microsystems, Inc.



Similar documents
How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

What Is the Java TM 2 Platform, Enterprise Edition?

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

Contents. Client-server and multi-tier architectures. The Java 2 Enterprise Edition (J2EE) platform

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Java 2 Platform, Enterprise Edition (J2EE): Enabling Technologies for EAI

Implementation of an Enterprise-level Groupware System Based on J2EE Platform and WebDAV Protocol

Java-technology based projects

J2EE Web Development. Agenda. Application servers. What is J2EE? Main component types Application Scenarios J2EE APIs and Services.

Enterprise Integration Architectures for the Financial Services and Insurance Industries

How To Protect Your Computer From Being Hacked On A J2Ee Application (J2Ee) On A Pc Or Macbook Or Macintosh (Jvee) On An Ipo (J 2Ee) (Jpe) On Pc Or

3-Tier Architecture. 3-Tier Architecture. Prepared By. Channu Kambalyal. Page 1 of 19

Internet Engineering: Web Application Architecture. Ali Kamandi Sharif University of Technology Fall 2007

Introduction to Sun ONE Application Server 7

CS Developing Web Applications with Java Technologies

WebSphere Training Outline

JEE Web Applications Jeff Zhuk

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

JAVA ENTERPRISE IN A NUTSHELL. Jim Farley and William Crawford. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo.

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

Architectural Overview

Enterprise Applications

JAVA Technologies QUARTER 1 DESKTOP APPLICATIONS - ESSENTIALS QUARTER 2 NETWORKING AND OPERATING SYSTEMS ESSENTIALS. Module 1 - Office Applications

Agenda. Java Features Review. Extreme Java G Session 1 - Main Theme Introducing Extreme Java

NetBeans IDE Field Guide

WebSphere Application Server - Introduction, Monitoring Tools, & Administration

Glassfish, JAVA EE, Servlets, JSP, EJB

White paper. IBM WebSphere Application Server architecture

Web Application Architecture (based J2EE 1.4 Tutorial)

Client/server is a network architecture that divides functions into client and server

Virtual Credit Card Processing System

Building Web Applications, Servlets, JSP and JDBC

Architecture Design For Web-based Application Systems. Instructor: Dr. Jerry Gao Class: CMPE296U

-8*6-DYD6HPLQDU 6HUYOHW$UFKLWHFWXUHV 5DLQHU+LVV$QGUHDV.DSS 6<6725$*

JBS-102: Jboss Application Server Administration. Course Length: 4 days

A framework for web-based product data management using J2EE

Extreme Java G Session 3 Main Theme Java Core Technologies (Part I) Dr. Jean-Claude Franchitti

WebSphere Product Family Overview

The Comparison of J2EE and.net for e-business

WebSphere Server Administration Course

Core J2EE Patterns, Frameworks and Micro Architectures

CONSUMER DEMAND MONITORING AND SALES FORECASTING (CDMFS) SYSTEM

EJB & J2EE. Component Technology with thanks to Jim Dowling. Components. Problems with Previous Paradigms. What EJB Accomplishes

era J2EE Platform and Tool Recommendations

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

A Comparison of Software Architectures for E-Business Applications

As you learned about in Chapter 1, WebSphere Application Server V6 supports the

How To Understand The Architecture Of Java 2Ee, J2Ee, And J2E (Java) In A Wordpress Blog Post

25 May Code 3C3 Peeling the Layers of the 'Performance Onion John Murphy, Andrew Lee and Liam Murphy

Sun Certified Enterprise Architect for J2EE Technology Study Guide

WebLogic Server 7.0 Single Sign-On: An Overview

Client-server 3-tier N-tier

C/S Basic Concepts. The Gartner Model. Gartner Group Model. GM: distributed presentation. GM: distributed logic. GM: remote presentation

IBM WebSphere Server Administration

zen Platform technical white paper

Oracle WebLogic Server 11g: Administration Essentials

RNM Reply Network Manager

How To Develop A Web Service In A Microsoft J2Ee (Java) 2.5 (Oracle) 2-Year Old (Orcient) 2Dj (Oracles) 2E (Orca) 2Gj (J

Java E-Commerce Martin Cooke,

Detailed Table of Contents

Web Services and Application Frameworks (.NET and J2EE)

Chapter 2 TOPOLOGY SELECTION. SYS-ED/ Computer Education Techniques, Inc.

Understanding Application Servers

Developing XML Solutions with JavaServer Pages Technology

Getting Started with Web Applications

Distributed Database Design

Communiqué 4. Standardized Global Content Management. Designed for World s Leading Enterprises. Industry Leading Products & Platform

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Basic TCP/IP networking knowledge of client/server concepts Basic Linux commands and desktop navigation (if don't know we will cover it )

Tutorial: Design Patterns in the VSM

Performance Comparison of Java Application Servers

SAS Drug Development Integration & PheedIt

SAS Information Delivery Portal

Distributed Objects and Components

The Design of B2B E-commerce System Based on MVC Model and J2EE

Service Oriented Architectures

PERFORMANCE MONITORING OF JAVA COMPONENT-ORIENTED DISTRIBUTED APPLICATIONS

In this chapter, we lay the foundation for all our further discussions. We start

Oracle WebLogic Server

Oracle WebLogic Server 11g Administration

Java Application Server Guide. For Version 10.3 or Later

MERMIG The advanced collaboration software

CSI 2132 Lab 8. Outline. Web Programming JSP 23/03/2012

MagDiSoft Web Solutions Office No. 102, Bramha Majestic, NIBM Road Kondhwa, Pune Tel: /

2012 LABVANTAGE Solutions, Inc. All Rights Reserved.

Core Java+ J2EE+Struts+Hibernate+Spring

Mastering Tomcat Development

Web Services and Service Oriented Architectures. Thomas Soddemann, RZG

Transcription:

Java 2 Platform, Enterprise Edition (J2EE) Bruno Souza Java Technologist, Sun Microsystems, Inc. J1-680, Hapner/Shannon 1

Contents The Java 2 Platform, Enterprise Edition (J2EE) J2EE Environment APM and key APM questions Application Scenarios and the Sample Application Deployment and Security Resources J1-677, Kassem 2

A Short History of Java Enterprise Technology J1-680, Hapner/Shannon 3

The Java Platform Year 1 JDK All Things to Everyone Where Have We Been? Where Are We Going? Year 2 Year 3 JDK All Things to the Enterprise Early Development of Consumer Java Early Development of Enterprise APIs Micro Edition Standard Edition Enterprise Edition J1-680, Hapner/Shannon 4

Java 2 Platforms Java Technology Enabled Devices Java Technology Enabled Desktop Workgroup Server High-End Server J1-680, Hapner/Shannon 5

Why another Java 2 Platform? J1-680, Hapner/Shannon 6

The Global Enterprise D D D EIS Tier DBMSs ERP Systems Middle-Tiers Enterprise Services Clients Device J1-680, Hapner/Shannon 7

Enterprise Services Require Concurrency (multi user) Consistency (Transactions) Security Availability Scalability Administration EIS Integration Distribution J1-680, Hapner/Shannon 8

The Java 2 Platform, Enterprise Edition Develop With the J2EE App Model Deploy With the J2EE App unit Run On the J2EE Platform J1-680, Hapner/Shannon 9

J2EE Platform J1-680, Hapner/Shannon 10

What is the purpose of J2EE Containers? J1-680, Hapner/Shannon 11

J2EE Platform Applet Container Web Container EJB Container Applet HTTP/ HTTPS JSP Servlet RMI EJB J2SE App Client Container App Client HTTP/ HTTPS J2SE RMI JNDI JMS RMI/IIOP JDBC JNDI JMS JTA JavaMail JAF RMI/IIOP JDBC JNDI JMS JTA JavaMail JAF RMI/IIOP JDBC J2SE J2SE Database J1-680, Hapner/Shannon 12

Containers and Components The container is the car The component is the driver The container is the platform The component is your application J1-680, Hapner/Shannon 13

J2EE Containers Containers do their work invisibly No complicated APIs They control by interposition Containers implement J2EE Look the same to components Have great freedom to innovate J1-680, Hapner/Shannon 14

J2EE Containers Handle Concurrency (multi user) Consistency (Transactions) Security Availability Scalability Administration Integration Distribution J1-680, Hapner/Shannon 15

J2EE Components Handle Presentation Business logic Data access J1-680, Hapner/Shannon 16

Container Perspectives To a J2EE vendor It is their product To a component developer It is a standard app model To an app assembler It is a standard app package To an executing component It is god J1-680, Hapner/Shannon 17

Why Does J2EE Focus on Deployment? J1-680, Hapner/Shannon 18

Application Packaging EJB EJB EJB EJB Module DD 1 1 DD APP DD WEB WEB Web Client Module DD 2 2 DD Deployment Tool Application Client Module 3 DD 3 DD J1-680, Hapner/Shannon 19

Application Life Cycle Creation Assembly Deployment Created by Component Developer J2EE Modules Assembled and Augmented by Application Assembler J2EE APP Processed by Deployer Deploy J2EE Container Enterprise Components J1-680, Hapner/Shannon 20

The Deployer Is an expert in the operational environment Familiar with local security practices Familiar with local EIS configuration Familiar with local containers and their apps Uses J2EE platform product tools J1-680, Hapner/Shannon 21

Deployment Summary Apps may be written without knowledge of the operational environment Deployment Descriptor communicates app s needs A key interface between application developer and platform J1-680, Hapner/Shannon 25

What Exactly Is in J2EE? J1-680, Hapner/Shannon 26

J2EE API Summary J2SE 1.2 JDBC 2.0 RMI/IIOP 1.0 EJB 1.1 Servlet 2.2 JSP 1.1 JNDI 1.2 JTA 1.0 JMS 1.0 JavaMail 1.1 JAF 1.0 J1-680, Hapner/Shannon 27

J2EE Standards TCP/IP HTTP 1.0 HTML 3.2 SSL 3.0 IIOP 1.0 J1-680, Hapner/Shannon 28

The Java 2 Platform, Enterprise Edition Platform Specification Defines J2EE requirements Compatibility Test Suite Validates J2EE platform compatibility Reference Implementation Operational J2EE platform Application Programming Model Describes how to build J2EE applications J1-680, Hapner/Shannon 29

Java 2 Platform, Enterprise Edition Application Programming Model (APM) Organized set of design patterns, templates and architectural principles Focus is on design of manageable, deployable and maintainable J2EE applications Results in faster product delivery time to market of enterprise solutions Recommends how the J2EE specifications should be applied to application domains J1-677, Kassem 3

Some Key APM Questions Choose Servlets or JavaServer Pages technology (JSP)? Access EIS Resources via Enterprise JavaBeans technology (EJB) server or Directly from JSP? Session Beans or Entity Beans? Distributed transactions or local transactions? How to exchange Data with External Systems? J1-677, Kassem 6

The J2EE Environment Enabling End-to-end Solutions Firewall Client Application Server Client Client Enterprise JavaBean Enterprise Information Systems (EIS): Client Client Web Server JSP, Servlet, HTML, XML Enterprise JavaBean Relational-Database, Legacy Applications, ERP Systems Client Tier Middle Tier Other Services: JNDI, JMS, Java Mail EIS Tier J1-677, Kassem 7

Web Access Exposes application logic to web client(s) as coarse grained service(s): Responsible for handling user input/application presentation Named via URI Modeled as HTML (or XML) Comprised of dynamic and static content Java Server Pages for dynamic content: Higher level of abstraction than Servlets Easier to generate HTML (and XML in future) J1-677, Kassem 8

Other Clients EJB from another application : RMI/IIOP now, JMS later Standalone clients : CORBA client: IIOP access direct to application logic Java technology client: RMI/IIOP or JMS access Desktop productivity application: MS desktop integration solution via plug-in, JRE and RMI/IIOP J1-677, Kassem 9

Application Logic Modeled using EJBs: SessionBean (stateless & stateful) EntityBean (CMP or BMP) Componentize: Workflow, processes, business rules and entities Fine grain imperative interface contract External resources are logically named internally Customized via deployment descriptor Resolved by deployer at deployment time J1-677, Kassem 11

Enterprise Information Services (EIS) Integration is achieved by either: Directly using platform API such as: JDBC JMS Java Naming and Directory Interface (JNDI) Or via Connector(s): Connector is: Resource adapter, Access Bean, integration tool(s) Ubiquitous Connector APIs for specific EIS products J1-677, Kassem 12

EJB Components JNDI EJB Container Client Entity EJP Data Access Bean Connector EIS HTTP(S) Service Servlet/JSP Session EJP Data Access Bean Connector EIS Middle Tier J1-677, Kassem 13

Application Scenarios Web Server App. Server 1 6 7 EIS Resources Browser Web Server App. Server Stand-alone 2 5 3 4 J1-677, Kassem 14

Core Application Scenarios 1 3 5 7 n-tier Web Access HTML, XML, HTTP client JSP/Servlets, RMI/IIOP EJBs, JDBC (Connectors) n-tier Intranet Access EJB Client, EJB Sever 2-tier Java Client JSP/Servlets and JDBC B2B Enterprise Transactions EJBs, JMS and XML Sample App. J1-677, Kassem 15

Sample Application High Level Requirements Must offer Web Presence Must be Robust and Scalable Must leverage existing EIS resources Must utilize core competencies of diverse development teams Must facilitate B2B transactions Get it done yesterday! J1-677, Kassem 16

Sample Application High Level Technical Decisions Client tier Chose HTML Clients for End-User Web Access Chose XML for selective Data externalization Web Server tier Chose JSP/Servlets to be WS neutral App Server tier Chose EJB s to be AS neutral JDBC Data Access Beans to encapsulate EIS access Chose to optionally support distributed transactions J1-677, Kassem 17

SA Scenario Web-based browsing of a product catalog Creation and maintenance of a shopping cart User account creation Placing orders Secure order processing B2B transactions Externalization of order data (expressed in XML) Order confirmation using e-mail J1-677, Kassem 19

SA Activity Diagram Customer Sales Warehouse View Catalog Add to Cart Select Account Process Order Pull Stock Ship Order Receive Order Bill Customer Pay Bill Close Order J1-677, Kassem 20

SA DB Schema table product ( productid category...) table category ( catid...) table lineitem ( orderid linenum itemid...) table orders ( orderid userid...) table supplier ( suppid...) table attrdesc ( attrcode...) table inventoryitem ( itemid productid supplier...) table orderstatus ( orderid linenum...) table account ( userid...) J1-677, Kassem 21

SA Architecture Session Beans UserValidatorEJB Entity Beans AccountEJB Access Beans AccountDAB Tables Account Physical DBs MailerEJB Orders OrderEJB OrderDAB OrderStatus db1 ShoppingCartEJB Line item EStoreKeeperEJB CatalogDAB Category db2 CatalogEJB Product InventoryEJB InventoryDAB Inventory J1-677, Kassem 22

SA JSP Usage <html> <jsp:request include="/banner.html"/> <form action="validatenewuseraccount.jsp" name="login"> <table border ="0"> <tr><td>user ID:</td> <td align="left"><input type="text" size="15" name="user_name"></td> </tr> <tr><td>password:</td> <td align="left"><input type="password" size="15" name = "password"></td> </tr>.. </table> </html> J1-677, Kassem 23

SA JSP Usage <html> <% if (formvalid){ %> <jsp:usebean id="useraccount" class="com.sunw.estore.account.jspbeans.useraccountjspbean" scope="session" /> <jsp:setproperty name="useraccount" property="init" value="<%= session %>" /> <jsp:setproperty name="useraccount" property="billinglastname" param="last_name" />... <% } else { %>... <% } %> </html> J1-677, Kassem 24

SA Controller Interface public interface EStorekeeper extends EJBObject { public Catalog getcatalog() throws RemoteException; public ShoppingCart getshoppingcart() throws RemoteException; public Credential getcredential() throws RemoteException; public Account getaccount() throws RemoteException; public Enumeration getorders() throws RemoteException, FinderException; public void handleevent(estoreevent se) throws RemoteException; } J1-677, Kassem 25

SA Controller Implementation public class EStorekeeperEJB implements SessionBean { public void ejbcreate() throws RemoteException { sm = new StateMachine(this); } public Catalog getcatalog() throws RemoteException { if (catalog == null) { Locate Catalog try { EJB s H/I using JNDI Context initial = new InitialContext(); Object objref = initial.lookup (EJBUtil.jndiNameOfCatalogHome); CatalogHome cataloghome = (CatalogHome) PortableRemoteObject.narrow(objref, CatalogHome.class); catalog = cataloghome.create(); } catch (NamingException ne) {... } return catalog; } J1-677, Kassem 26

Application Model Makes Recommendations across all tiers Client Middle-tier (includes Web server and EJB) Data access Messaging External application integration Communication protocols Deployment file formats Results in Faster product delivery J1-677, Kassem 31

J2EE Resources White paper: http://java.sun.com/j2ee J1-677, Kassem 32