Outline. Chapter 5 Application Server Middleware. Types of application server middleware. TP monitors CORBA Server-side components and EJB Summary

Similar documents
Outline. Chapter 5 Application Server Middleware. Types of application server middleware. TP monitors CORBA Server-side components and EJB Summary

Outline. Chapter 5 Application Server Middleware WS 2010/11 1. Types of application server middleware

Today: Distributed Objects. Distributed Objects

Chapter 10 Web-based Information Systems

Chapter Outline. Chapter 2 Distributed Information Systems Architecture. Layers of an information system. Design strategies.

Chapter 6 Object Persistence, Relationships and Queries

Deccansoft Software Services. J2EE Syllabus

Chapter 4 Remote Procedure Calls and Distributed Transactions

Communication and Distributed Processing

Chapter Outline. Chapter 2 Distributed Information Systems Architecture. Distributed transactions (quick refresh) Layers of an information system

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

Chapter 2 Distributed Information Systems Architecture

What is CORBA? CORBA (Common Object Request Broker Architecture) is a distributed object-oriented client/server platform.

Distributed Object-Based Systems The WWW Architecture Web Services Handout 11 Part(a) EECS 591 Farnam Jahanian University of Michigan.

CORBA Object Transaction Service

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

Communication and Distributed Processing

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

Outline. Chapter 4 Remote Procedure Calls and Distributed Transactions. Remote Procedure Call. Distributed Transaction Processing.

Enterprise Java Beans

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.

Appendix A - Glossary(of OO software term s)

Chapter 6 Enterprise Java Beans

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR (ODD SEMESTER) QUESTION BANK

Understanding and Designing with EJB

Middleware for Heterogeneous and Distributed Information Systems

MTAT Enterprise System Integration. Lecture 2: Middleware & Web Services

Application Servers in E-Commerce Applications

Course Content for Java J2EE

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

Client/Server-Architecture

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

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

Interconnection of Distributed Components: An Overview of Current Middleware Solutions *

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

Distributed Objects. Object-Oriented Application Development

Java Enterprise Edition

Part 6: Distributed Objects and EJB. 2003, Karl Aberer, EPFL-SSC, Laboratoire de systèmes d'informations rèpartis Part 5-1

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

CORBA (Common Object Request Broker Architecture)

JSpring and J2EE. Gie Indesteege Instructor & Consultant

Topics. Advanced Java Programming. Transaction Definition. Background. Transaction basics. Transaction properties

Enterprise JavaBeans (I) K.P. Chow University of Hong Kong

Oracle 10g: Build J2EE Applications

JOTM: Overview and Perspectives

Today: Distributed Middleware. Middleware

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

NetBeans IDE Field Guide

Advanced Topics in Operating Systems

Verteilte Systeme (Distributed Systems)

Middleware: Challenges and Evolution from Procedural to Service Orientation

GemStone Systems. GemStone. GemStone/J 4.0

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

Java EE 7: Back-End Server Application Development

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

IBM. Enterprise Application Development with IBM Web Sphere Studio, V5.0

Chapter 11 - Data Replication Middleware

Chapter 10 Web-based Information Systems

3C05 - Advanced Software Engineering Thursday, April 29, 2004

Plan. Department of Informatics. Advanced Software Engineering Prof. J. Pasquier-Rocha Cours de Master en Informatique - SH 2003/04

Distributed Middleware. Distributed Objects

CHAPTER 2. Introduction to Middleware Technologies

Lecture 3: Synchronous Interaction Patterns Traditional Middleware

Chapter 6 Object Persistence, Relationships and Queries

Enterprise JavaBeans Technology

presentation DAD Distributed Applications Development Cristian Toma

Enterprise JavaBeans. Layer:01. Overview

Introduction to componentbased software development

Enterprise JavaBeans, Version 3 (EJB3) Programming

JAYARAM. COLLEGE OF ENGINEERING AND TECHNOLOGY Pagalavadi, Tiruchirappalli (An approved by AICTE and Affiliated to Anna University)

1.264 Lecture 16. Legacy Middleware

Distributed Environments. CORBA, JavaRMI and DCOM

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

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

Basic Web Applications. Extreme Java G Web Server. Enterprise Data. Client Browser

VisiBroker VisiTransact Guide

OTS 1.1 vs. OTS 1.2 Approvers Function Name Approvers comments Reviewers Function Name Reviewers comments

Applications MW Technologies Fundamentals. Evolution. Applications MW Technologies Fundamentals. Evolution. Building Blocks. Summary.

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

Java 2 Platform, Enterprise Edition: Platform and Component Specifications

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

CO Java EE 7: Back-End Server Application Development

History of Enterprise Java

Agent and Object Technology Lab Dipartimento di Ingegneria dell Informazione Università degli Studi di Parma. Distributed and Agent Systems

J2EE Interview Questions

DCOM CORBA EJB DCOM CORBA CORBA EJB DCOM EJB

UNIT-III EJB APPLICATIONS

Conception of Information Systems Lecture 8: J2EE and EJBs

DS 2009: middleware. David Evans

K L M N O P Q R S T U V W X Y Z

Distributed Object-based Systems CORBA

WebSphere 4.0 General Introduction

OracleAS 10g R3: Build J2EE Applications II

Mohsin Qasim Syed Abbas Ali

IIOP: Internet Inter-ORB Protocol Make your code accessible even in future, with the next universal protocol

UNIT 4 CORBA 4/2/2013 Middleware 59

Designing a Distributed System

Projects. How much new information can fit in your brain? Corporate Trainer s Profile TECHNOLOGIES

(9A05803) WEB SERVICES (ELECTIVE - III)

Business-Driven Software Engineering (6.Vorlesung) Bean Interaction, Configuration, Transactions, Security Thomas Gschwind <thg at zurich.ibm.

Transcription:

Prof. Dr.-Ing. Stefan Deßloch AG Heterogene Informationssysteme Geb. 36, Raum 329 Tel. 0631/205 3275 dessloch@informatik.uni-kl.de Chapter 5 Application Server Middleware Outline Types of application server middleware tasks TP monitors CORBA Server-side components and EJB Summary 2 1

Types of Middleware RPC/RMI middleware infrastructure basic development and execution support additional services TP monitor transaction management, TRPC process management broad set of capabilities Object broker (e.g., CORBA) distributed ect computing, RMI additional services Object transaction monitor = TP monitor + ect broker most often: TP monitor extended with ect-oriented (ect broker) interfaces Component Transaction Monitor = TP monitor + distributed ects + server-side component model 3 Middleware Tasks Distributed computing infrastructure (RPC, RMI) Transactional capabilities programming abstractions (demarcation) distributed transaction management Security services authentication, authorization, secure transmission, Unified access to heterogeneous information sources and application systems Scalable and efficient application processing large number of client applications or end users Reliability, high availability Programming model abstractions that allow the developer to focus on application logic (i.e., ignore infrastructure) 4 2

Java RMI Location-transparency Platform-independence Java only Additional drawbacks no standardized RMI format/protocol missing support for important information systems services transactions, security,... no support for remaining middleware tasks 5 RPC Middleware Infrastructure DCE Distributed Computing Environment (DCE) developed by Open Software Foundation (OSF) attempt to provide a standardized RPC implementation Additional services provided by DCE cell directory name and directory service supporting RPC domains time clock synchronization across nodes threads support for threads and multiple processors distributed files share file data across DCE environment security authentication, secure communication 6 3

TP Monitor Provides functionality to develop, run, manage, and maintain transactional distributed IS transaction management process management Additional capabilities (beyond TRPC) high number of connected clients/terminals (10 2-10 4 ) concurrent execution of functions access shared data most current, consistent, secure high availability short response times fault tolerance flexible load balancing administrative functions installation, management, performance monitoring and tuning One of the oldest form of middleware proven, mature technology 7 Basic Components of a TP Monitor Interface programs and terminals Program flow store, load, execute procedures Router maps logical resource operations to physical resources (e.g., DBMS) Communication manager infrastructure for communicating with resources Transaction manager Wrappers hide heterogeneity of resources Services security, performance management, high availability, robustness to failures, transaction managment end user client application interface program flow programs router resources communication wrapper wrapper resource resource TP services 8 4

Scalable and Efficient Application Processing Managing large workloads one process per client is not feasible TP monitor manages server pools groups of processes or threads, prestarted, waiting for work client requests are dynamically directed to servers extends to pooling of resource connections Load balancing distribute work evenly among members of pool TP monitor can dynamically extend/shrink size of server pools based on actual workload management of priorities for incoming requests 9 Transactional Services Need to strictly distinguish TP monitor and TA manager functionality many users/applications don't need TP monitor: batch applications, ad-hoc query processing special application systems (e.g., CAD) have their own (terminal) environment but all need transactional support Separation of components for transactional control (TA manager) transaction-oriented scheduling and management of resources (TP monitor) 10 5

CORBA - Introduction CORBA: Common Object Request Broker Architecture Object-oriented, universal middleware platform ect bus architecture based on RMI concept language-independent platform-independent OMG industry consortium (founded in 1989, 11 members) today over 1000 members creates specifications (no standard/reference implementations) First CORBA products appeared in the 90's e.g., IONA's Orbix in 1993 (for C and C++) 11 CORBA Reference Model Object Management Architecture (OMA) Application Interfaces Domain Interfaces Object Request Broker Interfaces in different categories Object Services (horizontal) Domain Interfaces (vertical) Telecommunication Finance E-Commerce Medicine... Application Interfaces Object Services 12 6

CORBA Interface Definition Language IDL defines: Types Constants Object-Interfaces (Attributes, Methods and Exceptions) Independent of programming language language-specific IDL compilers Java C++ Cobol Java C++ Cobol IDL Client Stub IDL Server Skeleton ORB 13 CORBA IDL - Example Module PizzaService { interface OrderService { void neworder (in long custno, out long orderno); void additem (in long orderno, in long pizzano, in long count); }; interface DeliveryService { long delivery(in long custno); }; }; interface Order { readonly attribute long id; // only get-method attribute Date deliverydate; // Date is an IDL interface void additem(in long pizzaid, in long pizzacount); }; 14 7

CORBA Core Components Object References (Interoperable Object References, IOR) Object Request Broker (ORB) Object Adapter Stubs and Skeletons Dynamic Invocation/Skeleton Interface (DII/DSI) Stub DII ORB ORB Skeleton DSI Interface Interface Object Adapter Client ORB Core Server ORB Core network Service-specific: Stub, Skeleton Identisch for all applications: ORB Interface, DII, DSI 15 CORBA ORB and Object Adapter ORB provides network communication and connection management manages stubs (client-side) maps RMI to ect adapter (server side) provides helper functions (e.g., converting ect references) Object adapter: Portable Object Adapter (POA) generated ect references maps RMI to server ects activates/deactivates/registers server ects may perform multi-threading, ORB + ect adapter = request broker 16 8

CORBA Static and Dynamic Invocation Static invocation stub and skeleton generated by IDL compiler IDL interface is mapped to specific programming language static type checking (at compile time) Dynamic invocation ect interfaces (meta data) can be discovered/selected at run-time using interface repository generic DII (dynamic invocation interface) operations are used to construct and perform a request dynamic type checking (at run-time) more flexible, but less efficient than static invocation 17 CORBA On the wire Data format: defines encoding of data types defines responsibilities for required conversions Common Data Representation (CDR) Communication protocol defines client/server interactions message format message sequence CORBA 2.0: General Inter-ORB Protocol (GIOP) Internet-Inter-ORB-Protocol (IIOP) maps GIOP to TCP/IP internet as Backbone-ORB optional: Environment-Specific Inter-ORB Protocols (ESIOP) example: DCE Common Inter-ORB Protocol (DCE-CIOP) 18 9

CORBA Object Services Goal: extend basic ORB capabilities to provide additional OTM system services Naming, Life Cycle, Events, Persistence, Concurrency Control, Transaction, Relationship, Externalization, Query, Licensing, Properties, Time, Security, Trading, Collections Service usage functionality defined using CORBA-IDL CORBA ect invokes method of service ect Example: NameService CORBA ect implements interface provided as part of a service (may not need to provide any code) Example: TransactionalObject 19 CORBA Object Transaction Service Based on X/OPEN DTP model and capabilities (flat) ACID transactions optional: nested transactions TAs may span across ORBs X/OPEN DTP interoperability with "procedural" TA-Managers Roles and interfaces transactional client demarcation (begin, commit, rollback) uses OTS Interface Current transactional server participates in TA, does not manage any recoverable resources "implements" OTS Interface TransactionalObject only serves as a "flag" to have the ORB propagate the transaction context optionally uses OTS Interface Current recoverable server participates in TA, manages recoverable resources implements OTS Interface TransactionalObject and Resource, uses Current and Coordinator participates in 2PC 20 10

OTS Elements and Interaction Transactional Client Transactional Server Transactional Object Recoverable Server Recoverable Object Resource ORB begin, commit, may force Rollback Register 2PC rollback resources for Commit/Rollback Transaction Context Transaction Service (OTS) 21 Server-side Component Models Problems with CORBA (up to 2.0) complex, non-standard programming of server ects service usage (transactions, security,...) behavior fixed at development time resource management, load balancing proprietary programming model and interfaces, is supported by ect adapter Standardized Server-side component model defines a set of "contracts" between component and component server for developing and packaging the component developer focuses on application logic service use can be defined at deployment time by configuring the application component code generation as part of deployment step resource management, load balancing realized by application server component only has to fulfil certain implementation restrictions server components are portabel 22 11

Enterprise JavaBeans (EJBs) Standard server-side components in Java encapsulates application logic business ect components can be combined with presentation logic component models servlets, JSPs EJB container run-time environment for EJB provides services and execution context Bean-container contract EJB implements call-back methods Interoperability with CORBA EJB-Server invocation: RMI/IIOP EJB-Container services EJB Client EJB EJB DB Dateisystem (Alt-)- Anwendung 23 EJB - Concepts Enterprise Java Bean (EJB) consists of (ejb-jar file): class implementing business logic (Bean) remote interface, defining methods life-cycle interface (Home interface) create, retrieve, delete deployment descriptor primary-key class for uniquely identifying persistent bean ects Client interacts with bean using EJB ect und EJB home generated at deployment time Client CartHome Cart CartBean EJB Container 24 12

EJB Basic Types Session Beans realizes business activity or process Entity Beans represent persistent business ects Message-driven Beans asynchronous, meassge-oriented (JMS) facilitates intergration with existing applications 25 Entity Beans Persistent ects ect state usually managed by a DBMS Primary-Key allows ect access Home interface has methods for creating, finding, deleting EB Home.findByPrimaryKey(...) individual finder methods an entity (instance) can be used by multiple clients/ects governed by concurrency, transaction mechanisms Persistence mechanism bean-managed (BMP), container-managed (CMP) Relationships management of relationships between entities Query EJB-QL specification of semantics of user-defined finder methods 26 13

Session Beans Realization of session-oriented activities and processes isolated client from entity details reduces communication between client and server components Session beans are transient bean instance exists (logically) only for duration of a "session" Home.create(...), Home.remove() stateless session bean state available only for single method invocation stateful session bean state is preserved across method invocation session context association of bean instance with client necessary not persistent, but can manipulate persistent data example: use JDBC, SQLJ to access RDBMS 27 Example look up Home interface Context initialcontext = new InitialContext(); CartHome carthome = (CartHome) initialcontext.lookup( java:comp/env/ejb/cart ); create session bean carthome.create( John, 7506 ); invoke bean methods cart.additem(66); cart.additem(22);... delete session bean cart.remove() 28 14

Deployment EJB is server-independent What happens during deployment make classes and interfaces known specify mapping of bean attributes to DB structures configuration regarding. transactional behavior configuration of security aspects setting environment/context variables generation of glue-code Specified using a deployment descriptor XML file 29 Demarcation of Transactions method invocation transactional ect transaction RM RM RM "RM" 30 15

Transactional Object Behavior begin commit no current TA-context: begin commit propagate existing TA-context don't propagate existing TA-context no current TA-context: current. TA: suspend error! new TA: begin commit RM RM old TA: RMresume "RM" 31 Transaction Management Approaches Explicit (programmatic) management method interacts with TA manager using demarcation API begin, commit, rollback suspend, resume management of transaction context direct: passed along as explicit method parameter indirect (preferred!): a "current" TA context is propagated automatically Implicit (declarative) management separate specification of transactional properties can be realized/modified independent of application logic may be deferred to deployment phase supported through container services Combination of both approaches in distributed IS 32 16

Explicit Demarcation with JTA Can be used by EJB Session Beans and EJB client, web components EJB: in descriptor transaction-type = Bean not supported for EntityBeans Demarcation uses JTA UserTransaction begin() creates new TA, associated with current thread commit() ends TA, current thread no longer associated with a TA rollback() abortsta setrollbackonly() marks TA for later rollback beans with implict TA-mgmnt can use method on EJBContext settransactiontimeout(int seconds) sets timeout limit for TA getstatus() returns TA status information active, marked rollback, no transaction,... Stateless SessionBeans begin() and commit() have to be issued in the same method Stateful SessionBeans commit() and begin() can be issued in different methods TA can remain active across method invocations of the same bean 33 Implicit (Declarative) Demarcation in EJB begin commit Descriptor: Required Descriptor: Supports Descriptor: NotSupported Descriptor: Mandatory Descriptor: RM RM RequiresNew RM "RM" 34 17

EJBs Transactional Properties Transaction attributes for methods specified in deployment descriptor: TA-Attribute Client-TA TA in method Not Supported none T1 none none Supports none T1 none T1 recommended for CMP entity beans Required RequiresNew none T1 none T1 T2 T1 T2 T2 Mandatory none T1 error! T1 Never none T1 none error 35 JTS Architecture (EJB-) application server resource adapter resource manager javax.transaction. TransactionManager javax.transaction. xa.xaresource JTA JTS TM Java- Mapping of CORBA Org.com. CosTransactions JTS or OTS transactions manager (TM) 36 18

Transactions in J2EE Application component may use Java Transaction APIs (JTA) UserTransaction ect provided via JNDI (or EJB-context) Java application or application server javax.transaction. TransactionManager JDBC JMS DB i DB k TM javax.transaction. xa.xaresource RM 37 MQ Server EJB Resource Management Traditional task of a (component) TP monitor pooling of resources, load management and balancing EJB specification Instance Pooling and Instance Swapping EJB server manages (small) number of Enterprise Beans reuse, dynamic selection for processing incoming requests made possible by 'indirect' bean acces via EJB ect usually only applicable for stateless session beans and for entity beans Passivation and Activation bean state can be stored seperately from bean (passivation) allows freeing up resources (storage), if bean is not used for a while (e.g., end user think time) if needed, bean can be reactivated (activation) uses Java Serialization can also be used for stateful session beans "Disallowed" for EJB developers: creating threads, using synchronization primitives I/O, GUI operation network communication JNI 38 19

CORBA Component Model Motivated by success of EJB component model New CORBA Component Model (CCM) as middle-tier infrastructure adds successful EJB concepts separates implementation from deployment provides container capabilities (transactions, persistence, security, events) interoperability with EJBs Advantage: CORBA components can be implemented in various programming languages 39 Summary Distributed computing infrastructure and transactional capabilities are core application server middleware features Different types of application server middleware TP monitors, ect brokers, ect transaction monitors, component transaction monitors Additional tasks addressed by middleware security, uniform access to heterogeneous resources, scalable and efficient application processing, reliability, high availability, server-side component model high-level abstractions portability of server components deployment phase Broad variance of support for these tasks Convergence of different types of middleware 40 20