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



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

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

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

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

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

XML & Databases. Tutorial. 2. Parsing XML. Universität Konstanz. Database & Information Systems Group Prof. Marc H. Scholl

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

Software Development using MacroMedia s JRun

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

White paper. IBM WebSphere Application Server architecture

Announcements. Comments on project proposals will go out by in next couple of days...

Introduction to Sun ONE Application Server 7

Enterprise Applications

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

Java EE 7: Back-End Server Application Development

Component Middleware. Sophie Chabridon. INT - INF Department - Distributed Systems team 2006

Java E-Commerce Martin Cooke,

WebSphere Training Outline

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

Distributed Objects and Components

New Methods for Performance Monitoring of J2EE Application Servers

Chapter 4. Architecture. Table of Contents. J2EE Technology Application Servers. Application Models

Performance Comparison of Java Application Servers

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

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

Glassfish, JAVA EE, Servlets, JSP, EJB

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

Infrastructure for Automatic Dynamic Deployment of J2EE Applications in Distributed Environments

Developing XML Solutions with JavaServer Pages Technology

JEE Web Applications Jeff Zhuk

IBM WebSphere Server Administration

WEB APPLICATION DEVELOPMENT. UNIT I J2EE Platform 9

WebSphere Server Administration Course

Web Application Architecture (based J2EE 1.4 Tutorial)

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

Java-technology based projects

Enterprise Application Integration

Partitioning and Clustering Demonstration

A standards-based approach to application integration

Java in Web 2.0. Alexis Roos Principal Field Technologist, CTO Office OEM SW Sales Sun Microsystems, Inc.

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

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

How To Create A C++ Web Service

Introduction to XML Applications

Enterprise Integration Architectures for the Financial Services and Insurance Industries

Java EE Introduction, Content. Component Architecture: Why and How Java EE: Enterprise Java

NetBeans IDE Field Guide

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

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

Tomcat 5 New Features

CGI Vs. Java - Which is Better For Marketing

RNM Reply Network Manager

Instituto Politécnico Nacional Escuela Superior de Cómputo. THEMATIC UNIT: I Introduction to Web Applications

Course Description. Course Audience. Course Outline. Course Page - Page 1 of 5

Oracle WebLogic Server 11g Administration

The Enterprise Java Internet Provider

Sun Microsystems Inc. Java Transaction Service (JTS)

JAVA/J2EE DEVELOPER RESUME

An introduction to creating JSF applications in Rational Application Developer Version 8.0

ucosminexus Application Server and BPM/ESB Platform Terminology Guide Y99(E)

JSLEE and SIP-Servlets Interoperability with Mobicents Communication Platform

CONSUMER DEMAND MONITORING AND SALES FORECASTING (CDMFS) SYSTEM

Developing Java Web Services

Building Web Applications, Servlets, JSP and JDBC

Databases and Information Systems 2

Java EE 6 Ce qui vous attends

CST6445: Web Services Development with Java and XML Lesson 1 Introduction To Web Services Skilltop Technology Limited. All rights reserved.

GlassFish. Developing an Application Server in Open Source

Increasing IT flexibility with IBM WebSphere ESB software.

10. Ausblick Zusammenfassung. Datenbanksysteme und ihre Realisierung. Datenmodelle. Anwendungen. RDM (Kap. 3) Transaktionen (Kap.

WEB SERVICES. Revised 9/29/2015

Long haul product development

<Insert Picture Here> Java EE 7: the New Cloud Platform

Efficiency of Web Based SAX XML Distributed Processing

Java Data Objects. JSR000012, Version 0.8 Public Review Draft. Specification Lead: Craig Russell, Sun Microsystems Inc.

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

Expert One-on-One J2EE Design and Development

Choosing a J2EE application server for your commercial software application

Service Oriented Architectures

Distributed Database Design

ITS. Java WebService. ITS Data-Solutions Pvt Ltd BENEFITS OF ATTENDANCE:

<Insert Picture Here> Java EE 7: the New Cloud Platform

enterprise^ IBM WebSphere Application Server v7.0 Security "publishing Secure your WebSphere applications with Java EE and JAAS security standards

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

Learning GlassFish for Tomcat Users

Core J2EE Patterns, Frameworks and Micro Architectures

PERFORMANCE MONITORING OF JAVA COMPONENT-ORIENTED DISTRIBUTED APPLICATIONS

The Java EE 6 Platform. Alexis Moussine-Pouchkine GlassFish Team

Enterprise Application Development Using UML, Java Technology and XML

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

ACM Crossroads Student Magazine The ACM's First Electronic Publication

Reusing Existing * Java EE Applications from Oracle SOA Suite

Net-WMS FP Net-WMS SPECIFIC TARGETED RESEARCH OR INNOVATION PROJECT. Networked Businesses. D.8.1 Networked architecture J2EE compliant

Oracle WebLogic Server

WebSphere Application Server - Introduction, Monitoring Tools, & Administration

The Top Five Things Every IT Manager Should Know Before Deploying a BPM Solution

Virtual Credit Card Processing System

Transcription:

Java 2 Platform, Enterprise Edition (J2EE): Enabling Technologies for EAI Tony Ng, Staff Engineer Rahul Sharma, Senior Staff Engineer Sun Microsystems Inc. 1

J2EE Overview Tony Ng, Staff Engineer Sun Microsystems Inc. 2

What is Java 2 Platform, Enterprise Edition? Java 2 Enterprise Edition (J2EE) is a platform that enables solutions for developing, deploying and managing n- tier server-centric enterprise applications. J2EE provides building blocks for EAI 3

Java Platforms Java Technology Enabled Devices Java Technology Enabled Desktop Workgroup Server High-End Server 4

5 J2EE Integrated Platform Mail Data Objects Mail Transactions Objects Directory Transactions Messaging Directory Transactions Messaging

J2EE Platform Deliverables J2EE specification Defines the J2EE requirements J2EE reference implementation Prototype of J2EE platform J2EE compatibility test suite Vaidates J2EE platform compatibility J2EE blueprints Best practices for J2EE solutions 6

J2EE Reference Implementation Fully functional prototype Allow development of compatibility tests Help developers prototype J2EE technology-enabled applications Help server platform and tool vendors build J2EE platform support in their products Source code available 7

Compatibility Test Suite Allow branding of compatible servers Ensure all J2EE implementations branded by Sun conform to the J2EE specification Move us towards the goal of Write Once, Run Anywhere 8

J2EE Blueprints Best practices for J2EE Examples, patterns, templates J2EE blueprints include: Book, Designing Enterprise Applications Application Java Pet Store 9

10 J2EE Architecture

J2EE Components Enterprise JavaBeans TM (EJB ) Business logic JavaServer Pages TM (JSP) Dynamic content Servlet Portable CGI script Application Client First-tier Java application 11

J2EE Technologies J2EE Connector Architecture Enterprise systems integration Java Message Service (JMS) Asynchronous messaging Java API for XML Processing XML transformation Java Transaction API Data integrity 12

J2EE Technologies (Cont...) Java Naming and Directory Interface (JNDI) Enterprise directory JavaMail Email Notification JDBC Database connectivity JavaIDL, RMI, CORBA Remote services 13

J2EE Containers Container handles: Concurrency Transactions Security Scalability Distribution Components provide: Business logic Presentation 14

15 J2EE Components and Containers JNDI J2SE JMS RMI/IIOP JDBC Database Database App App Client Client App Client App Client Container Container HTTP/ HTTP/ HTTPS HTTPS J2SE J2SE RMI RMI J2SE J2SE JNDI JNDI JMS JMS RMI/IIOP RMI/IIOP JDBC JDBC JTA JTA JavaMail JavaMail JAF JAF JNDI JNDI JMS JMS RMI/IIOP RMI/IIOP JDBC JDBC JTA JTA JavaMail JavaMail JAF JAF HTTP/ HTTP/ HTTP HTTP S Applet Applet Container Container Applet Applet JSP JSP Servlet Servlet EJB EJB Web Container Web Container EJB Container EJB Container RMI RMI J2SE J2SE

Benefits of Using J2EE Faster solution delivery time to market Components JavaServer Pages, EJB and other APIs Freedom of choice No vendor lock Skill reuse Simplified connectivity JDBC, Connector, CORBA, JMS 16

J2EE and EAI Components and containers: EJB:business process Servlet, JSP: web components JAXP: XML parsing and transformation Connectors: EIS integration JMS: Asynchronous messaging Future: JAXM, XML data binding 17

Building EAI framework J2EE provides building blocks EAI frameworks add: Intelligent routing Metadata facility Rules engine Integration of business processes Workflow Tools 18

Enterprise JavaBeans Tony Ng, Staff Engineer Sun Microsystems Inc. 19

The Problem Difficult to write distributed, n-tier applications Focus on business logic, not plumbing Multi-platform, heterogeneous environment Time to market 20

What Is the Enterprise JavaBeans Architecture? A component architecture for the development and deployment of distributed business applications Goals Simplify development and deployment of business applications Separate business logic from system code Portable components (Write Once, Run Anywhere ) 21 Allow multi-vendor interoperability

EJB Features Flexible component model Attribute-based application semantics Transaction: Declarative and programmatic Security: ACLs on operations Distributed access: home and remote interfaces Deployment: ejb-jar file 22

Benefits Simplifies development Write once, run anywhere Industry support Vendor/platform independent Partitioning of expertise 23

Types of Enterprise Beans Session Beans Stateless Stateful Entity Beans Bean-managed persistence Container-managed persistence Message-Driven Beans 24

Session Beans On behalf of a single client May keep conversation state (stateful) Relatively short-lived: client session Do not survive server crashes Example: shopping cart 25

Entity Beans Represents business entities Shared access for multiple users Long-lived: as long as data in database Transactional Survive server crashes Container Managed Persistence: Relationships, EJB-QL Example: Account, Employee 26

Message-driven Beans New enterprise bean type Asynchronous Activated upon message arrival Stateless No home or remote interface Configured as listener for queue/topic 27

Message-driven Bean Scenario JMS Topics <Entity EJB> Publish/subscribe MessageDrivenBean Process Order Order Bean Procure Inventory <Entity EJB> Inventory Management Bean Database Mail 28

Roles Enterprise bean provider Application assemblers Deployers System administrator EJB server/container provider 29

Deployment Descriptor Declarative rather than programmatic Allows easy customization Transaction attributes Security attributes Access control list Resource and EJB references Environment properties 30

Transaction Declarative or programmatic Transparent support for distributed transaction EJB server handles transaction boundaries propagation resource enlistments 31

Security Declarative and/or programmatic Access control list on business methods RunAs mode Security-related methods in enterprise bean context 32

Writing Enterprise beans Implement business methods and component contract Define home and remote interface Define deployment descriptor Deploy and Run Tools support 33

Home Interface Allows a client to create, locate or destroy a bean Example: public interface AccountHome extends EJBHome { public Account create(string ssn, String name) throws CreateException, RemoteException; } public Account findbyprimarykey(string ssn) throws FinderException, RemoteException; 34

Remote Interface Exposes business methods to clients Example: public interface Account extends EJBObject { public void debit(double amount) throws InsufficientBalanceException, RemoteException; public void credit(double amount) throws RemoteException; public double getbalance() throws RemoteException; } 35

Business Logic public class AccountBean implements EntityBean { // entity state private String name; private double balance; public void debit(double amount) throws InsufficientBalanceException { if (balance - amount < 0.0) { throw new InsufficientBalanceException(); } balance -= amount; } // more business methods and // component contract implementation } 36

XML Support in J2EE Tony Ng, Staff Engineer Sun Microsystems Inc. 37

XML in J2EE Java API for XML Processing Future Technologies: Java API for XML Messaging (JAXM) Java XML Data Binding 38

JAXP 1.1 Java Community Process initiative JSR- 000063 Feature list: SAX2.0. SAX 2 extensions. DOM Level 2 Core interfaces. XSLT 1.0 Improved mechanism for factory lookup. 39

JAXP: Processing APIs for Java User Application JAXP Interfaces Reference Impl Other Impl 40

JAXP Description A lightweight API for parsing XML Documents API for transformation, referred to as TrAX. Allows for pluggable parsers Allows for pluggable XSLT enginges. Allows processing of XML using: Callback Driven (SAX) Tree Based (DOM) XSL Transformation. 41

SAX2.0 API Simple API for XML Accesses Documents Serially Fast and Lightweight Harder to Program Sequential Access Only Org.xml.sax Org.xml.sax.ext 42

SAX 2.0 (Contd) XML Document Input Parser Events Provided Handler 43

SAX used via JAXP import java.xml.parsers.* import org.xml.sax.* SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setvalidating(true); SAXParser parser = factory.newsaxparser(); parser.parse("http://server.com/foo.xml", handler); // can also parse InputStreams, Files, and // SAX input sources. 44

SAX ContentHandler import org.xml.sax.* public class MyHandler implements ContentHandler { public void startdocument() throws SAXException { // start processing here. Could store it in a // stack and build your own tree representation // This is the first method invoked } public void enddocument() throws SAXException { // This is the last method invoked on the // handler } } 45

DOM Level 2 Document Object Model Access XML document via a tree structure Composed of element nodes and text nodes Can "walk" the tree back and forth Larger memory requirements org.w3c.dom.* 46

DOM Level 2 (Contd) XML Document Input Parser Creates Tree 47

DOM used via JAXP import java.xml.parsers.* import org.w3c.dom.* DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setvalidating(true); DocumentBuilder builder = factory.newdocumentbuilder(); Document doc = builder.parse("http://server.com/foo.xml"); // can also parse InputStreams, Files, and // SAX input sources. 48

XSLT 1.0 XSL Transformations. Syntax and semantics for transforming xml documents into other xml documents or any other format. Expressed as a well-formed xml document. Recommended Processing Instruction to apply to an xml document <?xml-stylesheet href="mystyle.css" type="text/css"?> 49

XSLT 1.0 (Contd) XML Document Input XSLT Processor Result Resulting XML Document XSL Stylesheet 50

XSLT used via JAXP import java.xml.transform.*; Transformer transformer; TransformerFactory factory = TransformerFactory.newInstance(); try { // Create a transformer for a particular stylesheet. transformer = factory.newtransformer( new StreamSource(stylesheet)); // Transform the source xml to System.out. transformer.transform(new StreamSource(sourceId), new StreamSource(System.out)); } catch (Exception e) { // handle error } 51

XSLT used via JAXP (contd) The following example illustrates the serialization of a DOM node to an XML stream. import java.xml.transform.*; TransformerFactory tfactory = TransformerFactory.newInstance(); Transformer serializer = tfactory.newtransformer(); Properties oprops = new Properties(); oprops.put( method, html ); oprops.put( indent-amount, 2 ); serializer.setoutputproperties(oprops); serializer.transform(new DOMSource(doc), new StreamResult(System.out)); 52

Plugability Factory lookup is accomplished by System property javax.xml.parsers.saxparserfactory javax.xml.parsers.documentbuilderfactory javax.xml.transform.transformerfactory $JAVA_HOME/lib/jaxp.properties file Jar Services API META- INF/services/javax.xml.parsers.XXXFactory Reference Default 53

Reference Implementation Parser and XSLT Engine based on ASF Code Apache Crimson for XML Parsing Apache Xalan for XSLT Processing 54

Current Status Public Review 2 of the spec and beta of the RI can be obtained by following links from http://java.sun.com/xml eedback aliases jsr63-comments@eng.sun.com 55