Extreme Java G22.3033-007

Session 11 - Main Theme Java Enterprise Web and Application Enabling (Part III)

Dr. Jean-Claude Franchitti

New York University Computer Science Department Courant Institute of Mathematical Sciences

1

Agenda

„ Summary of Previous Session

„ Enterprise JavaBeans (EJBs)

„ J2EE Connector Architecture

„ Practical Survey of Mainstream J2EE App. Servers

„ Web Services Developer Pack

„ Enterprise Application Integration (EAI) and Business to Business Integration (B2Bi)

„ J2EE Blueprint Programs

„ Class Project & Assignment #4c

2

1 Summary of Previous Session

„ Advanced Java Server Pages and Java Servlets

„ Java Server Faces

„ Jakarta Struts and Other Related Frameworks

„ Building Business Logic with J2EE

„ Patterns of Enterprise Application Architectures

„ XML Support for MDA Technology

„ Java and XML Tools for CLDC Applications

„ Class Project & Assignment #4b

3

Enterprise JavaBeans (EJBs) http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/

Also See Session 10 Main Theme Part IV on: “Building Business Logic with J2EE” Session 11 Sub-Topic 2 Presentation on: “Using Enterprise JavaBeans” and Session 11 (historical) Handouts on: “The Enterprise JavaBeans (EJB) Server Component Model” “Technical Introduction to Enterprise JavaBeans” “Deploying and EJB Application” “Introduction to Enterprise JavaBeans” “Building a Stateless Session Bean” “Using Enterprise JavaBeans” “EJB Application Servers” “Enterprise JavaBeans FAQs” 4 “I EJB Ri ht f M ?”

2 J2EE Initial Platform: Components + Container + Services “The Whole is Greater than the Sum of its Parts”

5

What is a Component Model?

„ Component Model Subsumes:

„ Component as a packaged software object with a standardized interface and reusable in multiple applications

„ Specification

„ Programming Model

„ Deployment Model

„ Administration Model

„ Component architecture

„ How components interact with each other and with software tools

6

3 Simplified J2EE Platform Today: “The Whole is Much Greater than the Sum of its Parts”

7

J2EE and Application Logic Tiers

8

4 J2EE Server and Containers http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Overview3.html

9

J2EE: A Complete Computing Environment

„ Platform Specification

„ Lists required elements of the platform

„ Lists policies to follow for a valid implementation

„ Reference Implementation (+ Sun ONE App. Server)

„ Semantically correct prototype to test against

„ Compatibility Test Suite

„ API-level compatibility, component-level tests, end-to-end compatibility

„ Application Programming Model: java.sun.com/j2ee 10

5 Enterprise JavaBeans Container

11

Enterprise JavaBeans and Services

Application Server Container Services Lifecycle Transaction Security Load Balancing Error Handling Threading Enterprise Java Persistence* Bean

* In the EJB 1.0 specification support for persistence services is optional. In the EJB 1.1 specification it is mandatory.

12

6 Sample DemoBean Application Architecture

13

J2EE: Components

„ Enterprise JavaBeans

„ Server-side solutions can be built without regards for the database, transaction server, or application they run on

„ Servlets

„ Run on vast majority of web servers

„ JavaServer Pages

„ Dynamic content leverages off the full power of Java 14

7 The Three Cs: Components, Containers, Connectors

15

J2EE: Containers

„ Containers provide high-performance, scalable environments for J2EE-enabled servers

„ J2EE-enabled servers support EJB-based components, servlets, and JSP-based pages

16

8 J2EE: Connectors

„ Connectors allow J2EE-based solution to preserve, protect, and leverage off of existing enterprise investments

17

J2EE: Unifying the Three Cs

„ Single platform

„ Standard platform-independent technology

„ Applications built with components can be run on any J2EE server, and are able to talk to enterprise- class systems that exist today

18

9 Creating an EJB Component

„ Example: try {

// get the JNDI naming context Context initialCtx = new InitialContext ();

// use the context to lookup the home interface CheckingHome home = (CheckingHome) initialCtx.lookup ("checking");

// use the home interface to create the enterprise Bean Checking server = home.create ();

// invoke business methods on the bean server.createAccount (1234, "Athul", 1000671.54d); } catch (Exception ex) { ex.printStackTrace (); }

19

Enterprise JavaBeans (EJBs)

„ Enterprise Application Platforms

„ Support Component Modeling with EJBs

„ Support Serving of EJBs

„ See Session 11 Handouts on EJBs

„ See Session 11 Sub-Topic 2 Presentation on Using Enterprise JavaBeans

„ Newer Application Server Technology Focused on “Model-Centric” Application Development

20

10 Entity Beans in EJB Application Servers

„ Represent sets of data (all or part of a database table or a view)

„ Functionality limited to creation, update, and deletion of data

„ Manage persistence of data

„ Maintained in a cache

„ Can be container or bean managed

„ Container-managed beans are under the control of an application server for persistence and transaction management

„ Container-managed beans are restricted in the type and complexity of data they can manage

„ Bean-managed beans rely on user provided code for persistence and transaction management

21

Entity Beans Related Components

„ EJB remote interface

„ EJB remote implementation

„ EJB home interface

„ EJB key

„ EJB finder helper interface

„ Deployment descriptor

„ Database scripts

22

11 Session Beans in EJB Application Servers

„ Handle the business logic of EJB applications

„ May use multiple entity beans to gather application data

23

Session and Entity Beans

Application Server

ct ra Account bt Up Su 00 Entity Bean dat Transfer $100 from $1 e A cco Account A to Account B ATM A unt

Session A t d un d co Database Bean $ Ac 1 e 0 at 0 pd Account U Entity Bean B

24

12 EJB Physical Partioning

Web Web Web A Domain Name System (DNS) Browser Browser Browser server routes incoming browser requests evenly across a pool of web servers. This technique is referred to as DNS round-robining. The application server provides fail-over if one of the web servers goes down. Web Web Web Server Server Server The application server distributes load across all available EJB servers and provides fail-over if one of the EJB servers goes down. EJB EJB EJB Server Server Server

EJBs communicate to the database through Java Database Connectivity (JDBC). The application server pools and Database manages database connections for maximum efficiency.

25

EJB Component/Programming Model

26

13 Practical Use of Application Server Services

27

An Abstract View: J2EE Patterns

28

14 Part II

J2EE Connector Architecture

29

J2EE Connector Architecture http://java.sun.com/j2ee/connector/

„ Problem:

„ Integration of Heterogeneous Enterprise Information Systems (EISs)

„ Sample EISs: ERP, mainframe transaction processing, database systems, and legacy applications not written in the Java programming language.

„ Solution:

„ J2EE Connector Architecture

„ One Resource Adapter for each Type of EIS is pluggable into a J2EE Application Server

30

15 Adding Support for B2B Transactions to EISs

31

J2EE Connector Architecture Diagram

32

16 J2EE Connector Architecture Components

„ System Contracts

„ Connection management contracts (1.0)

„ Transaction management contracts (1.0)

„ Security contract (1.0)

„ Transaction and Message Inflow contracts (1.5)

„ Lifecycle and Work management contracts (1.5)

„ Resource Adapter

„ System-level software driver used to connect to an EIS

„ Provides transaction, security, and connection pooling

„ Implements the EIS-side of the system-level contracts

„ Common Client Interface (CCI)

„ Intended for EAI and Enterprise tools vendors 33

Part III

Practical Survey of Mainstream J2EE/CORBA 3 Application Servers Special Focus on WAS 5.0

Also see Session 8 Main Theme Part V on “Distributed Object Computing Today and NG” and Session 11 Handouts on: “Application Servers Comparison” “WebSphere by IBM”

34

17 Java-Based and J2EE Application Servers

„ Third-Party Vendors

„ http://www.app-serv.com/contend.html

„ See:

„ http://www.mgm-edv.de/ejbsig/ejbservers.html

„ http://www.javaworld.com/javaworld/tools/jw-tools-appserver.html http://www.appserver-zone.com/

„ http://www.devx.com/devxpress/gurl.asp?i=1X1095373X7360

„ WebSphere Architecture and Programming Model:

„ http://www.research.ibm.com/journal/sj/373/bayeh.html

35

Commercial J2EE Environments

„ WebLogic 8.0

„ WebSphere 5.0

„ JBoss 3.06

„ Borland AppServer

„ iPlanet.com iPlanet

„ Sybase EAServer

„ Oracle 9i

„ IONA iPortal

„ Xoology Concerto

„ Aligo M-1

„ Advanced Network Systems WebIx 36

18 CORBA 3 Environments „ See:

„ http://ditec.um.es/~dsevilla/ccm/

„ Implementations (mostly open source):

„ GOAL Group OpenCCM - http://corbaweb.lifl.fr/OpenCCM/

„ ExoLab.org OpenCCM - http://corbaweb.lifl.fr/OpenCCM/

„ iCMG K2-CCM (C++) - K2-CCM

„ MICO/E (Eiffel ORB) - MicoCCM page

„ JavaCCM - http://dog.team.free.fr/details_javaccm.html

„ TAO Group - http://www.cs.wustl.edu/~schmidt/TAO.html

„ IONA iPortal (no CCM) - http://www.iona.com/products/ip_ipas_home.htm

„ Other companies: Eurescom/GMD/Humboldt U, Computational Physics/Photon Research, Sprint, ONE, Siemens, Sourceforge MI-3 (“Mission Impossible 3”) and CIF projects (http://sourceforge.net/projects/cif/), etc.

„ See Session 3 Sub-Topic 1 Presentation on “CORBA 3” 37

WebSphere Application Server Overview

38

19 WebSphere Terminology

„ Managed Process or Server

„ Each application/JMS server running in its own JVM

„ Node Agent

„ Manages servers running on a single physical machine (i.e., a node)

„ Deployment Manager

„ Manages multiples nodes in a distributed topology

„ Cell

„ Network of multiple nodes in a single logical administration domain

39

WAS 5.0 Offerings

„ WebSphere Application Server – Express „ RAD Environment for Servlets and JSP pages „ J2EE 1.3 and Web Services Subset „ Emphasizes Ease of Use, Small Footprint, and Pre-Canned Applications „ WAS „ J2EE 1.3 (EJB 2.0 & Servlet 2.3) and Web Services Support „ Replacement for WAS 4.0 – Single-Server Edition „ WAS Network Deployment (WAS-ND) „ Manages Multiple Application Servers & Handles Clustered Environments „ Replacement for WAS Advanced Edition „ Includes a Basic WAS with Deployment Features „ Distributed System Management, Clustering, Basic Workload Management, Monitoring, etc. 40

20 WAS 5.0 Offerings (cont.) „ WAS Extended Deployment (WAS-XD) „ Extended Version of WAS Network Deployment „ Cross-Domain Failure Bypass, Dynamic Load Balancing, etc. „ Optimizes Performance, Availability, and Scalability „ Includes Scalability and Manageability Features „ WAS Enterprise (WAS-EE): WAS-ND + WAS-XD + PMEs „ High-End Package that includes WebSphere MQ „ Includes Programming Model Extensions (API and Associated Run-Time & Mgmt. Features) „ Dynamic EJBQL, Access Intent (e.g., Optimistic/Pessimistic Concurrency Control), LE, BP Choreography, Extended Messaging/Transactions, CORBA C++ SDK, etc. „ Activity Service (JSR-95), WorkArea (JSR-149), Internationalization Service (JSR-150) „ Replacement of WAS Enterprise Edition 4.0

„ WAS Application Server for z/OS 41 „ Special Packaging Optimized for z/OS Environment

WebSphere Products

„ WebSphere Portal

„ WebSphere Commerce

„ WebSphere Host on Demand and Host Publisher

„ WebSphere Translation Server

„ WebSphere Voice Products

„ WebSphere EveryPlace

„ Transcoding Publisher

„ etc. 42

21 WebSphere Management Tools „ Assembly Tools „ Application Assembly Tool (AAT) „ Eclipse based AAT (future) „ WebSphere Studio Family of Products „ Enterprise Application Mgmt Tools „ Browser based Admin Console „ http://localhost:9090/admin „ Attached either to the App Server or the Cell „ Struts-based implementation „ Command line tools „ WSAdmin „ Java APIs „ All admin tools may modify configuration documents (i.e., resources., and variables.xml, etc.) located under /config 43

WebSphere Directions

„ Platform „ Reach and User Experience „ Business Integration „ Foundation and Tools „ Product Objectives „ Platform for Enterprise Computing „ Platform for Innovation „ Help Developers Focus on Building Applications „ Establish/Maintain Standards Leadership „ Flexible Set of Product Configuration Options „ Principles „ Platform Treated as a Development Principle „ IBM Leverages Core Competencies „ Platform Ensures Robustness „ WebSphere Used to Build Some of the Components of WebSphere „ Vision „ JMX „ Web Services „ Support for new PMEs and Enterprise Architecture Patterns 44

22 WebSphere in Production Deployments

45

J2EE Packaging „ J2EE Application .EAR file „ Application DD „ EJB Module .JAR file „ Enterprise Bean „ EJB DD „ Schema Map, Schema Attributes, Table Creation, IBM Extensions, IBM Bindings „ Web Module .WAR file „ Servlet „ JSP „ HTML, GIF, etc. „ Web DD „ IBM Bindings, IBM Extensions „ Client Module .JAR file „ Client Class „ Client DD „ IBM Bindings 46 „ IBM Bindings, IBM Extensions

23 WebSphere Packaging Extensions

„ Sample WebSphere Options

„ Web Application Reloading

„ File Serving and Servlet Invoker by Classname

„ Transaction Isolation Attributes

„ Extensions Stored in ibm-type-ext.xmi

„ Type is ejb or web

„ Defining IBM Extensions

„ Use Extension Editor in WSAD

„ Use the AAT Extensions Tab of the Component’s Property Sheet

47

WebSphere Packaging Bindings

„ Bindings are Used to Specify how Local Names or resources (e.g., ejb-ref) are tied into a J2EE runtime

„ Bindings stored in ibm-type-bnd.xmi

„ Type is “application”, “ejb”, or “web”

„ Defining IBM Bindings

„ Use Extension Editor in WSAD

„ Use the AAT when defining the resource-ref or ejb-ref 48

24 Application Assembly Tool (AAT)

„ Used to:

„ Build .war and .ear files

„ Configure application deployment properties and initial set of bindings

„ Configure application/server binding into .ear

„ Can use WSAD as an alternative

„ Bindings have to be entered during application installation

49

WebSphere Programming Model

See: ftp://ftp.software.ibm.com/software/websphere/partners/TheVisionForWASV5AndBeyond.pdf

50

25 WAS e-Business Computing Models

„ Multi-Tier Distributed Computing

„ Separation of presentation, business and data logic

„ Runtime component management architecture

„ Object identity, transaction & session management, security, versioning, clustering, workload balancing and failover, caching, etc.

„ Component Sharing

„ OO Modeling Compatibility

„ Web-Based Computing

„ Presentation logic relocated in the middle-tier

„ Uses a Tier-0 fixed-function device (i.e., Web browser)

„ Other Tier-1/2 devices are supported as well 51 „ Implements Edge-Computing via Servlets/JSPs

WAS e-Business Computing Models

„ Integrated Enterprise Computing „ Copes with Legacy Extensions „ Integration of pre-existing applications

„ SAP, CICS, Oracle, IMS, Windows, DB2, Tibco, PeopleSoft, Domino, MQSeries „ Supports “incremental business process re- engineering” „ Based on Java 2 Connectors and JMS

„ Point-to-point asynchronous messaging, request/response messaging, publish-subscribe messaging „ Moving towards Business Process 52 Management (BPM)

26 WAS e-Business Computing Models

„ Services-Oriented Computing

„ New approach to B2Bi

„ XML message encoding architecture + HTTP as a communication transport

„ Web services are about how to access a business service, while J2EE is about how to implement that business service

53

WAS Integrated Computing Model

„ J2EE Component-Based Programming models

„ Multiple Presentation Device Types

„ Web Services

„ Message-Oriented Programming

„ BPM „ Used to script the flow of process activities implemented as J2EE components

„ Legacy Integration via Java 2 Connectors and Higher-Level Adapters 54

27 Application and Component Design Patterns

„ See http://www.ibm.com/developerworks/patterns

„ Thick-Client Presentation Logic

„ Web-Client Presentation Logic

„ Model-View Controller

„ Componentized Business Logic

„ Encapsulation of Persistence and Data Logic

„ Adapter-Based Integration

„ Request-Response Messaging

„ Publish-Subscribe Messaging

„ Web Services

„ Workflow

55

WebSphere Development Model

„ Create a Design Model for your Application „ Develop Application Components and Organize them in the Web Application and Module Archives „ Define Deployment Policies for Components „ Transactional semantics, security assumptions, extended deployment policies, etc. „ Assemble Component JARs into WARs and EJB Modules, and create a J2EE EAR „ May use application assembly tool, and/or an XML editor to edit the J2EE XML descriptor files) „ Can also use WSAD „ Generate Deployment Code for Components „ Includes the creation of EJB properties mappings to the database schema „ Install Application to the WebSphere Runtime „ Directly on application server instance, or through Cell 56 Manager in a clustered environment

28 WebSphere Development Roles

„ Component Developer „ Responsible for codifying business and presentation logic in servlets, JSPs, and EJBs „ May be split in sub-roles „ Application Assembler „ Responsible for assembling components into an EAR that includes all modules, a manifest, and deployment descriptor information (deployment policies) „ Must understand overall functional objective „ Works with the DBA to implement/optimize the database mapping „ Application Deployer „ Responsible for installing the application into the runtime, picking and configuring the application server, and resolving dependencies „ System Administrator „ Responsible for configuring the application server network „ Addresses failures and performance bottlenecks „ Evaluates log files, test performance metrics, and monitors system utilization „ Performs capacity, integrity, and security management 57

WebSphere Development Roles

„ Author

„ Responsible for assembling static and dynamic content

„ Web Application and EJB Container Provider

„ WAS

„ Operations Centers Administrators

„ Business Managers

„ etc.

58

29 Programming Features „ J2SE 1.3 APIs „ Applets „ AWT/Swing „ JavaBeans „ I/O „ Language Classes „ J2SE Extensions „ JCE „ JSSE „ PKCS „ J2EE „ Servlet 2.3 „ JSP 1.2 „ EJB 2.0 „ JDBC 2.0 „ JTA 1.0 „ JMS 1.0.3 „ J2EE Connector Architecture 1.0 „ JAAS 1.0 „ JAXP 1.1 „ JavaMail 1.2 „ JAF 1.0 „ Web Services „ WebSphere Additional Functions 59 „ WebSphere Application Server Extension APIs

J2SE 1.3 Restrictions

„ J2SE 1.3 APIs

„ No particular WebSphere support for applets

„ Cannot drive AWT/Swing UIs from hosted applications

„ J2EE only permits AWT/Swing use of the clipboard, Swing events, and showing windows in a J2EE client container

„ These features are not allowed in applet, Web, or EJB containers without enabling privileged code

„ I/O operations may be restricted by file permissions

„ Access to system files or WebSphere runtime files is restricted

„ System-related runtime functions used to control ClassLoader, Security Manager, Threads/Thread Groups, Socket Factories, etc. are restricted

„ Process-related thread functions should not be used

„ Can be supported by enabling privileged code or using Async Beans (PME) to make WebSphere aware of the threads

„ Should not manipulate the garbage collector through references

„ Should not create in-bound socket listeners in hosted code

„ Should not construct an RMI server in the WAS

„ Avoid the direct use of J2SE security classes 60 „ Application clients, applets, servlets, and EJBs can only read properties

30 J2EE Extensions

„ com.ibm.websphere.servlet.cache

„ com.ibm.websphere.servlet.error

„ com.ibm.websphere.servlet.event

„ com.ibm.websphere.servlet.filter

„ com.ibm.websphere.servlet.request

„ Allows stream manipulation and introduces a servlet request proxy

„ com.ibm.websphere.servlet.response

„ Includes support for generating and storing responses

„ com.ibm.websphere.servlet.session

„ Session management across clusters

61

Web Services Support

„ Invocation Programming Interfaces

„ JAX-RPC

„ Web Services Invocation Framework (WSIF)

„ Handles SOAP over HTTP/JMS

„ Web Services Security

„ SOAP-SEC

„ Web Services Gateway

„ Act as Web Services Proxies

„ Useful to integrate J2EE and .Net services

„ UDDI 62

31 Additional Functions

„ Struts and Struts Tag Library

„ Extension APIs

„ Activity Sessions

„ Application Profiles

„ Asynchronous Beans and Scheduler

„ Business Rules Beans

„ Choreography

„ Container Managed Messaging

„ Dynamic EJB Query

„ Internationalization Extensions

„ JTA Synchronization Notification

„ Last Agent Optimization

„ Staff Services

„ Startup Beans 63 „ C++ ORB

WebSphere Programming Tools

64

32 Eclipse Platform

„ Integrated Development Platform for Building Diverse Applications

„ http://www.eclipse.org

„ Uses Standard Widget Toolkit (SWT) to look and feel like a native application

„ Common definition for resources, projects, and preferences

„ Extensibility via Eclipse plug-ins

„ Basic architecture includes a small Eclipse core, and various plugins (basic UI framework, core resource support, version control management, java development tools, etc.) „ WebSphere Studio is Built on the Eclipse 2.0 Platform 65

WebSphere Studio

„ Site Developer

„ Intended for professional developers of dynamic Web applications and sites

„ Supports servlets, JSPs, XML , and Web Services tools

„ Includes integrated WAS test environment and deployment automation tools

„ Application Developer

„ Site developer + advanced Web services and EJBs

„ Supports application execution tracing, profiling and performance analysis

„ Application Developer Integration Edition

„ Application Developer + full SOA development environment for business and EAI

„ Includes workflow visual builder and full choreography support

„ Enterprise Developer

„ Application Developer Integration Edition + EIS creation tools 66

33 Best Practices for Server-Side Applications Development

67

MVC Review

„ Model

„ Only one model

„ Implements business logic using JavaBeans/EJBs

„ View

„ One or many window(s) into the model

„ Provides presentation/user manipulation via JSPs

„ Controller

„ One or more

„ Parses and directs user requests via servlets

68

34 Architecture Design Principles

„ Layer the Application

„ Use JSPs for Presentation Only

„ Use Servlets as Controllers and to Maintain the Application State

„ Facilitate Evolving Architectural Requirements

„ Facilitate Incorporation of New Technologies

„ Facilitate Support for Different Types of Clients

„ Reduce Need for Future Application Maintenance

69

User Request Processing via Servlets

„ Servlet gets client request

„ Servlet determines which program elements are required to carry out the specified request

„ JavaBeans or EJBs perform the business logic operations for the request and encapsulate the results

„ Servlet selects a presentation template (JSP) to deliver the content back to the client

„ JSP generates a specific response by accessing the content available via the JavaBeans 70

35 JSP Design Considerations

„ Use Indirect Programming Model

„ JSP is invoked indirectly by a controller servlet

„ There should be no control behavior within the JSP

„ The amount of Java code within the JSP should be minimized

„ JSP is only there to provide a response to the client

71

Model Layer

„ Should be Split into

„ Domain Model Layer

„ Corresponds to the model in the MVC architecture

„ Infrastructure Model

„ Data mapping layer (persistence) that provides the mapping between domain objects and the data sources

„ Data source layer obtains and saves information in a data store

„ The decoupling allows reuse of domain objects across applications

72

36 Controller Flow Models

„ Action Based Processing

„ One servlet for each client request

„ A subclass of the base Action class is created for each type of request

„ Used by Web Frameworks

„ Struts relies on a single servlet for each client request, and action subclasses

„ Design enhances code testability, but it is difficult to write actions for applications with a complex state manager

„ State Based Model Alternative

„ Current State represented by a class implementing a common interface that defines each action/request as a method

„ Single HttpSession object is used to maintain the application state

„ Controller obtains the current state object and invokes a corresponding action method on that state object

„ Controller updates the application’s state object based on the result of the action 73

Exception Handling

„ Supports Graceful Recovery from Unexpected Application Errors

„ Global Handling

„ Handling is global for the entire application

„ WebSphere InstallableError Handler

„ ErrorReporter Servlet for debugging

„ Error-page that routes errors on any named JSPs

„ Local Handling

„ Handling is specific to the action performed

„ Expected errors are handled by specific JSPs

„ Unexpected errors are handled by Servlet 74

37 Controller Design Patterns

„ Command Pattern

„ Command object corresponds to a business logic task (i.e., action)

„ Command implemented as serialized objects „ State Pattern

„ Robustly handles complex state-based application behavior „ Memento Pattern

„ Behavioral pattern used to take a snapshot of a portion of an object’s state so that the object can be restored later

„ May be used in Web applications to handle the browser back button 75

Part IV

Web Services Developer Pack

Also see Session 7 Main Theme Part III and IV on “.Net” and “Web- and Application-Enabling Facilities”, Session 8 Main Theme Part VI on “Next Generation Component-Based Engineering”

“Distributed Object Computing Today and NG” and Session 11 Handouts on: “Application Servers Comparison” “WebSphere by IBM” 76

38 XML and J2EE (release chronology) „ Java XML Pack

„ All in one XML technology for Java

„ e.g., SAX, DOM, XSLT, SOAP, UDDI, ebXML, and WSDL

„ Java XML Pack Summer 02 Release

„ Java API for XML Messaging (JAXM 1.1)

„ Java API for XML Processing (JAXP 1.2)

„ Java API for XML Registries (JAXR 1.0_01)

„ Java API for XML-based RPC (JAX-RPC 1.0)

„ SOAP with Attachments API for Java (SAAJ 1.1)

„ Java Web Services Developer Pack 1.1 77

Web Services Stack

78

39 Implementation Diagram

79

Derivative Architecture Patterns

80

40 Web Services Latest Specifications (http://msdn.microsoft.com/webservices/ , http://www.ibm.com/webservices/, http://dev2dev.bea.com/techtrack/standards.jsp)

„ Baseline WS Specifications „ SOAP, UDDI, WSDL „ BPEL4WS „ Business Process Execution Language for WS „ Global WS Specifications „ WS-Coordination „ WS-Inspection „ WS-Referral „ WS-Routing „ WS-Security „ WS-Policy „ WS-Transaction

81

.Net Applications Support Technologies/Services

82

41 IBM WebSphere SDK for Web Services V. 5.0

„ Services-Oriented Computing

„ New approach to B2Bi

„ XML message encoding architecture + HTTP as a communication transport

„ Web services are about how to access a business service, while J2EE is about how to implement that business service

„ Web Services with WSAD Demonstration Tutorials:

„ Build and Test

„ Deploy and Publish 83

Part V

BPM, B2Bi, and EAI: Business Process Management, Enterprise Application Integration, and Business to Business Integration

Also See Session 11 Sub-Topic 3 Slides and Handout on: “Enterprise Application Integration”

84

42 WAS Integrated Enterprise Computing „ Copes with Legacy Extensions

„ Integration of pre-existing applications

„ SAP, CICS, Oracle, IMS, Windows, DB2, Tibco, PeopleSoft, Domino, MQSeries

„ Supports “incremental business process re- engineering”

„ Based on Java 2 Connectors and JMS

„ Point-to-point asynchronous messaging, request/response messaging, publish-subscribe messaging

„ Moving towards Business Process 85 Management (BPM)

BEA WebLogic Application Server

86

43 Architectural IDEs http://www.io-software.com,

The Unified Process Std. MDA Projections

ArcStyler Core Modules J2EE/EJB, .NET

BEA WebLogic Open MDA/UML/XML Repository MDA Cartridges

Business Pattern UML MDA-Engine Build, IBM WAS NT, z/OS Object Refinement Refinement Engine Deploy & Test with Meta IDE Modeler Assistant Assistant Support Borland, JBoss Optional integrated Tools

IDS ARIS Rational Rose Programming IDE Oracle, IONA

Architect MDA-Cartridge IDE & MDA Engine Edition adds support for custom infrastructure

87

Enterprise Application Integration (EAI)

„ XML Applications Categories:

„ XML Server-Side POP Frameworks

„ User Interface and Presentation Related Contexts

„ XML EAI (MOM) Frameworks

„ Simple Data Representation and Exchange

„ Web Services

„ Message-oriented Computing

„ Towards “Loosely Connected” Component-Based Architectures

„ See article at

„ http://java.sun.com/features/2001/02/xmlj2ee.p.html

„ See Session 11 SubTopic 3 Presentation on EAI

„ See Session 11 Handout on EAI 88

44 XML & DBMSs Comparison

„ Both separate data from rendition/presentation info

„ Similar languages

„ DBMSs: Forms and Reporting, DDL, DQL, DCL

„ XML: XSL, XQL, and processing instructions

„ No DML in XML

„ XML is paired with a scripting or programming language

„ Validation capabilities

„ DBMSs: datatyping, relationship constraints

„ XML: data type validity and semantic consistency checks

„ XML can handle data too complex for some databases

„ XML interchangeable form of data vs. multidatabases89

MOM Application Development Tools

„ Serializing Java objects into XML using reflection

„ Sims Computing lightweight XML messaging framework (based on JMS)

„ xmlBlaster Message Oriented Middleware project

„ MOM platform that uses XML for the message meta-data and quality of service information

„ Messages can be filtered using XPath expressions which match against the XML header document

„ Developing MOM applications using the

SAX/DOM APIs 90

45 B2Bi: B2B commerce and Enterprise Application Integration (EAI)

„ B2Bi is based on the transformation and routing of XML documents

„ B2Bi patterns:

„ Direct Application Integration

„ Data Exchange

„ Closed Process Integration

„ Open Process Integration

„ Existing Frameworks:

„ WebMethods B2Bi EAI framework

„ MQSI (MQSeries Integrator)

„ See STP/T+1 in Sub-Topic 1/2 Presentation 91

B2Bi Direct Application Integration Architecture

92

46 B2Bi Direct Application Integration Requirements

„ Ability to interact directly with application APIs

„ Integration brokers with built-in support for adapters, transformations, and asynchronous content0based routing

„ Same Integration Broker on both ends

„ Secure transport, component authentification, and user authorizations

„ Federated security control 93

Data Exchange B2Bi Architecture

94

47 Data Exchange B2Bi Requirements

„ Translation of data native to an application into a common document format, and transmission via a gateway

„ No constraints on the presence of Integration Brokers

„ B2B transactions enabled via a common data exchange format

95

Closed Process Integration B2Bi Architecture

96

48 Closed Process Integration B2Bi Requirements

„ Principal participant responsible for managing processes

„ Other participants are secondary, and do not have visibility into the entire process

„ Requires the introduction of business process integration (BPI) services

„ B2Bi product offerings are beginning to incorporate BPI as an essential component

„ In this case, B2Bi enables the integration of logical business process elements expressed as activities rather than data 97

Closed Process Integration B2Bi Architecture

98

49 Closed Process Integration B2Bi Requirements

„ Introduces the notion of shared processes rather than operating from a centralized master process manager model

„ Each participant is actively managing business processes within its domain

„ The BPI layer must support fine-grained control of managed processes

99

EAI Frameworks and XML

„ XML complements EAI technology

„ Powerful meta language

„ Simplicity

„ Separation of content and presentation format

„ Common open standard

„ EAI Frameworks must address the limitations of XML

„ Limited Semantics Interpretation

„ Lack of data transformation facilities

„ Inefficiencies of text-based documents

„ Absence of component-based routing 100

50 EAI Provides Data Transformations

101

Efficiency: Binary Objects on the Wire

102

51 Part VI

J2EE Blueprint Programs

103

Experimenting with J2EE Blueprint Programs • Prerequisites • WAS 5.0 Installation and Basic Administration • Application Assembly & Deployment with WAS 5.0 • IBM Specific Applications •ILS • Plants-By-WebSphere Application • J2EE Applications • PetStore Application

• http://www.javaworld.com/javaworld/jw-09-2001/jw-0928-rup.html • Java Adventure Builder Applications

• Project Framework 104

52 Part VII

Conclusion

105

Summary

„ The EJB Component Model Integrates Provides Infrastructure Support for Business Logic in the J2EE Framework

„ The J2EE Connector Architecture Allows B2Bi Support on top of Enterprise Information Systems

„ The WebSphere WAS Family of Technologies and Tools Provide Complete Support for J2EE Technologies Today

„ Sun Provides a Web Services Developer Pack and IBM has Developed a Web Services SDK to Support Web Services Application Development

„ Most Application Vendors Provide Integrated Support for BPM, B2Bi, EAI, LE, and EII

„ J2EE Blueprint Programs are Implemented on Top of 106 Mainstream Application Servers for Experimentation Purpose

53 Architecture Frameworks

„ CORBA & Applets (e.g., VisiBroker, and ORBacus)

„ RMI-JRMP and RMI-IIOP

„ Web Servers (e.g., Apache), Servlet & JSP Engines (e.g., Tomcat, JRun, WebSphere Client and Web Containers)

„ J2EE Application Servers (e.g., WebSphere, WebLogic, JBoss)

„ J2ME CLDC MIDP/PADP configuration and profiles

„ XML Parsers (e.g., XercesJ)

„ XML server-side POP frameworks (e.g., Cocoon 2/XSP)

„ XML EAI frameworks (e.g., WebMethods), B2Bi, BPM, LE, and EII

„ IDEs (e.g., JBuilder), and JavaBeans Development Kit (e.g., BDK) 107

Assignment „ Readings „ J2EE: Part III Chap. 12 and Appendix C „ Expert One-on-One: Chap. 1, 6, 10, 11, 14 „ Selected readings mentioned in class or referenced in the handouts „ Handouts posted on the course web site „ Assignment #4c: (submit report and implementation archive) „ Submit project increment 3 focused on the J2EE EJB container development. Recommendation: Modify ongoing version of Java-based application developed in assignment #3a to operate as an Enterprise JavaBeans application. „ Extra Credit: „ Implement a multi-tier version of your framework-based application using Web Services. „ While using the same specifications as for Assignment #3a, implement a new version of your application using a “Delegate” EJB Architecture using BEA’s WebLogic Server. Details regarding a proposed architecture are available at: http://www.weblogic.com/docs51/classdocs/corba.html#code. „ Project Framework Setup „ J2EE IDE: IBM WSAD, WAS, DB2 „ Java Plug-in, Java Web Start, Apache’s Xerces/Xalan „ J2SE 1.3.1, 1.4.0 or 1.4.1 (SDK) „ IDE: Eclipse, NetBeans, Sun ONE Studio, JBuilder, Visual Age, Visual Café, Codewarrior, WebGain Studio, Oracle JDeveloper, etc. „ Editors: JCreator, UltraEdit, etc. „ Visibroker 4.5.1 or BES 5.2 „ RMI-IIOP / Java IDL 108

54 EJB/CORBA Interoperability (http://www.weblogic.com/docs51/classdocs/corba.html#code and

http://www.javaworld.com/javaworld/jw-12-1999/jw-12-iiop_p.html)

109

Next Session: Java Enterprise Web and Application Enabling (Part III)

„ Summary of Previous Session

„ Applications of Java to Database Technology

„ Database Technology Review

„ Basic and Advanced JDBC Features

„ Readings

„ Class Project & Assignment #5a

110

55