WebSphere Application Server - Overview

Similar documents
WebSphere Application Server - Overview

Deccansoft Software Services. J2EE Syllabus

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

Exam Name: IBM Certified System Administrator - WebSphere Application Server Network Deployment V7.0

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

WEBSPHERE APPLICATION SERVER

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

(9A05803) WEB SERVICES (ELECTIVE - III)

IBM WebSphere Application Server Network Deployment V7.0 Core Administration. Version: Demo

Inside WebSphere Application Server

Oracle 10g: Build J2EE Applications

Classloader J2EE rakendusserveris (Bea Weblogic Server, IBM WebSphere)

IBM WebSphere Application Server V4.0. Performance. 10/02/01 Copyright 2001 IBM Corporation WS40ST11.prz Page 248 of of 28

WebSphere Application Server V8.0 Technical Overview

J2EE: Best Practices for Application Development and Achieving High-Volume Throughput. Michael S Pallos, MBA Session: 3567, 4:30 pm August 11, 2003

IBM WebSphere Application Server v6

Chapter 6 Enterprise Java Beans

presentation DAD Distributed Applications Development Cristian Toma

J2EE Interview Questions

IBM WebSphere Application Server 8. Clustering Flexible Management

B. Assets are shared-by-copy by default; convert the library into *.jar and configure it as a shared library on the server runtime.

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

Oracle9iAS Tech nicaloverview

Application Servers in E-Commerce Applications

C exam. IBM C IBM WebSphere Application Server Developer Tools V8.5 with Liberty Profile. Version: 1.

Enterprise Java Security Fundamentals

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

Services Oriented Architecture and the Enterprise Services Bus

Programming Web Services in Java

Problems in Scaling an Application Client

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

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.

BEAAquaLogic. Service Bus. Interoperability With EJB Transport

WebSphere 4.0 General Introduction

NetBeans IDE Field Guide

J2EE Development with Apache Geronimo. Aaron Mulder Chariot Solutions

Outline. Project Goal. Overview of J2EE. J2EE Architecture. J2EE Container. San H. Aung 26 September, 2003

Distributed Multitiered Application

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

WebSphere Application Server V7: System Management Technical Overview

IBM.Certdumps v by.GISELLE.90q

WA2097 WebSphere Application Server 8.5 Administration on Linux EVALUATION ONLY

Artix for J2EE. Version 4.2, March 2007

IBM HTTP Server, WebSphere, and SSL

Data Management in Application Servers. Dean Jacobs BEA Systems

SAS 9.2 Foundation Services. Administrator s Guide

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

The team that wrote this redbook

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

WebSphere Application Server V7: Session Management

BEAWebLogic. Server. Programming WebLogic Deployment

As you learned in Chapter 1, the architectural variations you can construct using

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

Connecting Enterprise Systems to WebSphere Application Server

CO Java EE 7: Back-End Server Application Development

COPYRIGHTED MATERIAL

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

Enterprise JavaBeans, Version 3 (EJB3) Programming

Course Content for Java J2EE

Designing a Distributed System

Administering the JBoss 5.x Application Server

Introduction to componentbased software development

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

BEA WebLogic Server. and BEA WebLogic Express. Introduction to BEA WebLogic Server 6.1

Java EE 7: Back-End Server Application Development

Chapter 2 Introduction

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

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

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

IBM EXAM - C IBM WebSphere Enterprise Service Bus V7.0, Integration Development. Buy Full Product.

Introduction to WebSphere Platform Messaging (WPM)

Java J Course Outline

JBOSS AS 7 AND JBOSS EAP 6 ADMINISTRATION AND CLUSTERING (4 Days)

Installing and Configuring the Runtime Processes 2

BEAAquaLogic. Service Bus. JPD Transport User Guide

Course: JBoss Training: JBoss AS 7 and JBoss EAP 6 Administration and Clustering Training

Techniques for Building J2EE Applications

J2EE Development with Apache Geronimo. Aaron Mulder Chariot Solutions

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

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Introduction to WebSphere Platform Messaging (WPM)

What we need. Agenda. What s J2EE. Challenges of Enterprise Application Development

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

WAS: WebSphere Appl Server Admin Rel 6

BEAWebLogic. Server. Introduction to WebLogic Server and WebLogic Express. Version 8.1 Revised: June 28, 2006 Part Number:

IBM WebSphere Enterprise Service Bus V7.0, Integration Development Exam.

JBoss SOAP Web Services User Guide. Version: M5

Web Application Development Using JEE, Enterprise JavaBeans and JPA

BEAWebLogic Server and WebLogic Express. Programming WebLogic JNDI

Enterprise JavaBeans. Layer 05: Deployment

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Open Source. in the Corporate World. JBoss. Application Server. State of the Art: Aaron Mulder

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

AquaLogic BPM Enterprise Configuration Guide

Upgrading Custom Java EE Applications from Oracle Application Server to WebLogic Server

BEA WebLogic. Server. Introduction to WebLogic Server and WebLogic Express

WebSphere Proxy Server: On Demand Configuration and Cross-Cell Routing

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

Web Services Development for IBM WebSphere Application Server V7.0

Index. attributes, visual modeling of, , 565, 566, 567, 568 authentication, Authorization Constraint wizard, , 396

Transcription:

IBM Italia SpA WebSphere Application Server - Overview Marco Dragoni IBM Software Group Technical Sales Specialist IBM Italia S.p.A. Milan, 07 January 2008 2007 IBM Corporation

Agenda IBM Value Assessment Course and speaker introduction What is an Application Server Model-View-Controller Pattern WebSphere Basic Architecture and mapping to MVC EAR file composition J2EE standard WebSphere Application Server Family Understand difference between Basic and Network Deployment Accessing Application Server Resource A typical application flow HTTP Server and Plug-in Class Loader role JNDI role JDBC resource Web Services for J2EE 2

Course and Speaker Introduction 7 January 2008 (14.30-16.30) WebSphere Application Server Overview (Marco Dragoni) 11 January 2008 (11.30-13.30) Order Process demonstration (Marco Dragoni). Service Oriented Architecture Introduction (Mariano Ammirabile) 14 January 2008 (14.30-16.30) WebSphere Integration Developer Introduction (Marco Dragoni) 16 January 2008 (14.30-17.30) LAB 01 Building a simple service-oriented application (BSM and BPEL) 18 January 2008 (11.30-13.30) WebSphere Process Server, WebSphere Enterprise Service Bus and WebSphere Service Registry and Repository Overview (Marco Dragoni) 23 January 2008 (10.30-13.30) LAB 02 BO mapping, Human Task and Selector component 3

What is an Application Server An Application Server is a runtime environment for hosting applications that are written following the J2EE specification An Applications Server, compliant with J2EE specification, offers services such as Security (JASS), Transaction (JTA), Messaging (JMS), Naming Services (JNDI), Database Connectivity (JDBC), etc. Any Web applications that are written to the J2EE specification can be installed and deployed on the server J2EE is: An open and standard based platform for developing, deploying and managing n-tier, Web-enabled, server-centric, and componentbased enterprise applications J2EE add value to Developer Vendors Business Customer 4

J2EE MVC Pattern (Model View Controller) Model to represent the underlying data and business logic behaviuor in one place (Entity and Session EJB). Make data and behaviour independent from presentation. Represented by EJB. View display information according to client types, display result of business logic. Represented by JSP. Controller serves as the logical connection between the users interaction and the business services on the back. Represented by Servlet. 5

J2EE Architecture 6 Web Tier EJB Tier The Presentation Tier processes input from the Client Side Tier, calls components in the Business Logic Tier, and then sends a response back to the Client Side Tier (Servlet, JSP) The Business Logic Tier provides a framework for executing business logic and for accessing business data in a distributed transactional environment (EJB)

Web Applications and anatomies It is often advantageous to treat each layer as an independent portion of your application Do not confuse logical separation of responsibilities with actual separation of components Some of the layers can be combined into single components to reduce application complexity J2EE application anatomies samples: HTML client, JSP/Servlets, EJB, JDBC/Connector (4 tiers) HTML client, JSP/Servlets, JDBC (3 tiers) EJB standalone applications, EJB, JDBC/Connector (3 tiers) 7

J2EE 1.4 Application Components Deployment Descriptor Web Module EJB Module Session Resource Adapter (RAR) Application Client Module HTML Main Class Java beans Servlet/JSP Entity MDB RA Java Classes RA Java Classes Deployment Descriptor Deployment Descriptor Deployment Descriptor Deployment Descriptor Runs in Application Server Runs in Application Client Container 8

J2EE 1.4 Standard supported 9

WebSphere AS Packaging WebSphere XD Dynamic Operation High Performance Computing Management Facility WebSphere ND Application Server Express/Base WebSphere CE Based on Apache Geronimo Extended Transaction Support Application Profiling Asynchronous Execution Dynamic Query Scheduling Startup Beans Service Integration Bus Clustering Failover Workload Mgmt Distributed Administration Web Services UDDI Registry Web Services Gat. Edge Components IBM Ldap for prod env. TAM for prod env. DB2 Session Persistance WebSphere ESB Mediation Functions WebSphere Process Server Process Choreography Business Rules Engine 10

WebSphere AS Basic Architecture Web Browser Application Server HTTP/S HTTP Server HTTP Server Plug-in HTTP/S Embedded HTTP Server Web Container Servlets JSPs Web Services Engine EJB Container EJBs Messaging Engine XML Configuration Files Application Application Databases Data Plug-in Configuration File Dynamic Cache Name Server Security Data Replication JMX Transaction.. 11

WebSphere AS Basic Administration WebSphere Administrative Clients Application Server Web Browser Internet or Intranet 9060 WEB Container Embedded HTTP Server Scripting Client (wsadmin) Custom Java Administrative Clients Soap/HTTP or RMI-IIOP Administrative Console Application Administrative Services Stand-alone Node Update Config Files J2EE Apps (EARs) Configuration Repository Administrative Console run inside the same JVM running customer application 12

WebSphere AS Express, Base Sample Topologies All in one machine Easy to maintain Low cost Low performance Example 1 HTTP Server WAS Database/EIS Example 2 Http Server + WebSphere Plug-in WebSphere AS Database/EIS DMZ Network Intranet Network All in different machine A DMZ can be established No competition between DB and other resources (different tuning) 13

WebSphere AS Network Deployment Architecture A deployment manager process manages the node agents Holds the configuration repository for the entire management domain, called a cell Administrative Console runs inside the DMgr A node is a logical grouping of servers Each node is managed by a single node agent process A managed node is a node that contains a node agent V6 V6 Application Application Server Server V6 V6 Application Application Server Server An unmanaged node is a node in the cell without a node agent V6 Node V6 Node Enables the rest of the environment to be aware of the node Cell 14

Network Deployment : File synchronization Deployment manager contains the master configuration Node agents synchronize their files with the master copy Automatically At start up Periodically Manually Administrative console Command line During synchronization 1. Node agent asks for changes to master configuration 2. New or updated files are copied to the node 15

Network Deployment : System Administration Administrative Clients Web Browser Internet or Intranet V6 Deployment Manager 9060 WEB Container Embedded HTTP Server Master Configuration for the Entire Cell Config Files J2EE Apps (EARs) Administrative Console Application Scripting Client (wsadmin) Custom Java Administrative Clients Soap/HTTP or RMI-IIOP Administrative Services Config Files J2EE Apps (EARs) ND allows you to manage the entire cell (all processes) from a central Deployment Manager Administrative clients connect to Deployment Manager Changes made by the administrative clients are saved in the master configuration The configuration is then synchronized with the Nodes Config Files V6 Application Server J2EE Apps (EARs) V6 Application Server V6 Node V6 Application Server V6 Application Server V6 Node Config Files J2EE Apps (EARs) 16

WebSphere AS Example configuration (ND package) LEGENDA Node Agent JVM AS WebSphere Traffic Client Traffic Internet Client Web Server + Plugin Caching Proxy WebSphere Cluster1 Load Balancer INTERNET DMZ INTRANET DMGR 17

Accessing Server Resources Application Server Web browser Web Services client HTTP(S) SOAP/HTTP(S) Embedded HTTP Server Web Container Servlets/JSPs Web Services Engine EJB Container EJBs Messaging Engine Application Application Databases Data Java client RMI/IIOP SOAP/JMS JMS Client 18

The flow of an application 19

Plug-in configuration file The plug-in configuration file (plugin-cfg.xml) contains routing information for all applications mapped to the Web server. This file is read by a binary plug-in module loaded in the Web server. 20

Plug-in XML tag description VirtualHostGroup, VirtualHost: A group of virtual host names and ports that will be specified in the HTTP Host header when the user tries to retrieve a page. Enables you to group virtual host definitions together that are configured to handle similar types of requests. The requested host and port number are matched to a VirtualHost tag in a VirtualHostGroup. UriGroup, Uri : A group of URIs that will be specified on the HTTP request line. The incoming client URI is compared with all the Uri tags in the UriGroup to see if there is a match to determine if the application server will handle the request for the Route in conjunction with a virtual host match. Route: The Route definition is the central element of the plug-in configuration. It specifies how the plug-in will handle requests based on certain characteristics of the request. The Route definition contains the other main elements: a required ServerCluster, and either a VirtualHostGroup, UriGroup, or both. Using the information that is defined in the VirtualHostGroup and the UriGroup for the Route, the plug-in determines if the incoming request to the Web server should be sent on to the ServerCluster defined in this Route. The plug-in sets scores for Routes if there is a VirtualHost and Uri match for an incoming request. Once the plug-in processes all Routes, the Route chosen is the one with the highest score. ServerCluster, Server: The located ServerCluster from the Route tag contains a list of Server tags that in turn contain the requested object. The ServerCluster located by finding the correct Route can optionally specify the WLM algorithm. This will then be used to select one Server from within the ServerGroup. Transport: Once a Server has been located, its Transport tags describe how to connect to it. 21

Plug-in workload management policies Weighted round robin When using this algorithm, the plug-in selects a cluster member at random from which to start. The first successful browser request is routed to this cluster member and then its weight is decremented by 1. New browser requests are then sent round robin to the other application servers and subsequently the weight for each application server is decremented by 1. The spreading of the load is equal between application servers until one application server reaches a weight of 0. From then on, only application servers with a weight higher than 0 will have requests routed to them. The only exception to this pattern is when a cluster member is added or restarted or when session affinity comes into play. Random Requests are passed to cluster members randomly. Weights are not taken into account as with round robin. The only time the application servers are not chosen randomly is when there are requests with sessions associated with them. When the random setting is used, cluster member selection does not take into account where the last request was handled. This means that a new request could be handled by the same cluster member as the last request. 22

Plug-in configuration file Session Affinity In a clustered environment, any HTTP requests associated with an HTTP session must be routed to the same Web application in the same JVM. This ensures that all of the HTTP requests are processed with a consistent view of the user s HTTP session. The exception to this rule is when the cluster member fails or has to be shut down. content value Cache ID 0000 Session ID SHOQmBQ8EokAQtzl_HYdxIt separator : Clone ID vuel491u <?xml version="1.0" encoding="iso-8859-1"?><!--http server plugin config file for the cell ITSOCell generated on 2004.10.15 at 07:21:03 PM BST--> <Config>... <ServerCluster Name="MyCluster"> <Server CloneID="vuel491u" LoadBalanceWeight="2" Name="NodeA_server1"> <Transport Hostname="wan" Port="9080" Protocol="http"/> <Transport Hostname="wan" Port="9443" Protocol="https">... </Config> 23

Plug-in configuration file Session Failover Server clusters provide a solution for failure of an application server. Sessions created by cluster members in the server cluster share a common persistent session store (Memory or Database). Any cluster member in the server cluster has the ability to see any user s session saved to persistent storage If one of the cluster members fail, the user can continue to use session information from another cluster member in the server cluster. This is known as failover. Failover works regardless of whether the nodes reside on the same machine or several machines. 24

Java Class Loader Class loaders enable the Java virtual machine (JVM) to load classes. Given the name of a class, the class loader locates the definition of this class. Each Java class must be loaded by a class loader. When you start a JVM, you use three class loaders: the Bootstrap class loader, the Extensions class loader, and the System class loader. The Extensions class loader is the parent for the System class loader. The Bootstrap class loader is the parent for the Extensions class loader. The class loaders hierarchy is shown Delegation is a key concept to understand when dealing with class loaders 25

ClassLoader behavior example A class called WhichClassLoader1 loads a class called WhichClassLoader2, in turn invoking a class called WhichClassLoader3 If all WhichClassLoaderX classes are put on the system class path, the three classes are loaded by the System class loader, and this sample runs just fine. Now suppose you package the WhichClassLoader2.class file in a JAR file that you store under <JAVA_HOME>/lib/ext directory. As you can image, the program fails with a NoClassDefFoundError exception, which might sound strange because WhichClassLoader3 is on the system class path. The problem is that it is on the wrong class path. 26

ClassLoader behavior example cont. The WhichClassLoader2 class was loaded by the Extensions class loader. In fact, the System class loader delegated the load of the WhichClassLoader2 class to the Extensions class loader, which delegated the load to the Bootstrap class loader. Because the Bootstrap class loader could not find the class, the class loading control was returned to the Extensions class loader. The Extensions class loader found the class and loaded it. Now, the Extensions class loader needs to load the WhichClassLoader3 class. It delegates to the Bootstrap class path, which cannot find the class, then tries to load it itself and does not find it either. A NoClassDefFoundError exception is thrown. Once a class is loaded by a class loader, any new classes that it tries to load reuse the same class loader, or go up the hierarchy to find a class. A class loader can only find classes by going up the hierarchy, never down. 27

WebSphere Class Loader policies The top box in red represents the Java (Bootstrap, Extension and System) class loaders. WebSphere loads just enough here to get itself bootstrapped and initialize the WebSphere extension class loader. The WebSphere extensions class loader is where WebSphere itself is loaded EJB modules, utility JARs, resource adapters files, and shared libraries associated with an application are always grouped together into the same class loader. This class loader is called the Application class loader. Depending on the application class loader policy, this application class loader can be shared by multiple applications (EARs), or be unique for each application, which is the default. 28

WebSphere ClassLoader policies cont. There are settings in WAS that allow you to influence WebSphere class loader behavior. When the application class loader policy is set to Single, a single application class loader is used to load all EJBs, utility JARs, and shared libraries within the application server (JVM). If the WAR class loader policy then has been set to Application, the Web module contents for this particular application are also loaded by this single class loader. When the application class loading policy is set to Multiple, the default, each application will receive its own class loader for loading EJBs, utility JARs, and shared libraries. Depending on whether the WAR class loader loading policy is set to Module or Application, the Web module might or might not receive its own class loader. Multiple Single Application Module Module 29

WebSphere ClassLoader delegation WebSphere s application class loader and WAR class loader both have a setting called the class loader mode. There are two possible values for the class loader mode: PARENT_FIRST and PARENT_LAST PARENT_FIRST. This mode causes the class loader to first delegate the loading of classes to its parent class loader before attempting to load the class from its local class path. This is the default policy for standard Java class loaders. PARENT_LAST, the class loader attempts to load classes from its local class path before delegating the class loading to its parent. This policy allows an application class loader to override and provide its own version of a class that exists in the parent class loader. 30

JNDI IBM Value Assessment WebSphere Application Server provides a JNDI implementation that you can use to access CosNaming name servers through the JNDI interface CosNaming provides the server-side implementation and is where the name space is stored. JNDI essentially provides a client-side wrapper of the name space stored in CosNaming, and interacts with the CosNaming server on behalf of the client. WebSphere application clients use the naming service to obtain references to objects related to those applications, such as EJB homes. These objects are bound into a mostly hierarchical structure, referred to as a name space. In this structure, all non-leaf objects are called contexts. 31

JNDI Naming operations, such as lookups and binds, are performed on contexts. All naming operations begin with obtaining an initial context. You can view the initial context as a starting point in the name space. For example: The name myapp/myejb consists of one non-leaf binding with the name myapp, which is a context. The name also includes one leaf binding with the name myejb, relative to myapp. The object bound with the name myejb in this example happens to be an EJB home reference. The whole name myapp/myejb is relative to the initial context, which can be viewed as a starting place when performing naming operations. 32

JNDI The name space can be accessed and manipulated through a name server. Users of a name server are referred to as naming clients Naming clients typically use Java Naming and Directory Interface (JNDI) to perform naming operations. Naming clients can also use the Common Object Request Broker Architecture (CORBA) CosNaming interface. Notice that all WebSphere Application Server processes host their own naming service and local name space (remove bottleneck) 33

JNDI There are three options available for binding EJB (<ejb-ref>) and resource (<resource-ref>) object names to the WebSphere Application Server name space: Simple name -- ejb/webbank/account Compound/fully qualified name -- cell/nodes/node1/servers/server1/ejb/webbank/account Corbaname -- corbaname::myhost1:9812/nameserviceserverroot#ejb/webbank/account The binding you can use to look up an object depends on whether or not the application is running within the same application server. 34

JNDI - Federated namespace The system partition is a reflection of the cell topology and is read-only. This part of the name space cannot be changed programmatically, because it is based on the configuration rather than runtime settings. The persistent partitions are primarily for the storage of resource configuration, such as data sources, JMS destinations etc. Cell persistent root. This partition is used to register persistent objects that are available to all the nodes and managed processes of a cell. Node persistent root. This partition is used to register persistent objects available to the nodes and it their managed processes. The server root transient partition is updateable through APIs, and is meant for information such as EJB bindings and JNDI names. This name space is transient and bindings are created each time a server process starts. It reads configuration data from the file system, for example EJB deployment descriptors, to register the necessary objects in this space. 35

JDBC Resource A data source represents a real-world data source, such as a relational database. When a data source object has been registered with a JNDI naming service, an application can retrieve it from the naming service and use it to make a connection to the data source it represents Information about the data source and how to locate it, such as its name, the server on which it resides, its port number, and so on, is stored in the form of properties on the DataSource object. This makes an application more portable because it does not need to hard code a driver name, which often includes the name of a particular vendor The connection is usually a pooled connection. That is, once the application closes the connection, the connection is returned to a connection pool, rather than being destroyed. Data source classes and JDBC drivers are implemented by the data source vendor. 36

JDBC Resource The programming model for accessing a data source is as follows: 1. An application retrieves a DataSource object from the JNDI naming space. 2. After the DataSource object is obtained, the application code calls getconnection() on the data source to get a Connection object. The connection is obtained from a pool of connections. 3. Once the connection is acquired, the application sends SQL queries or updates to the database. 4. Once the application component is finished with the connection, it calls the close() method on the connection. Closing a connection handle should not close the physical connection to the EIS. 37

JDBC Resource In WebSphere Application Server, connection pooling is provided by two parts, a JCA Connection Manager and a relational resource adapter The JCA Connection Manager provides connection pooling, local transaction, and security support The relational resource adapter provides JDBC wrappers and the JCA CCI implementation that allows BMP, JDBC applications, and CMP beans to access the database 38

JDBC Resource Connection Pooling WebSphere Application Server provides connection pooling for Java Database Connectivity (JDBC), Java Message Service (JMS), and Enterprise Information System (EIS) connections. The purpose of pooling connections is to improve performance by reducing the overhead involved in creating a new connection every time the application requests one. For JDBC connections, there is one connection pool for each data source that is created in WebSphere Application Server 39

Web Services for J2EE (JAX-RPC and WSEE) JAX-RPC provides the programming model for SOAP-based applications by abstracting the runtime details and providing mapping services between Java and WSDL. Web Services for J2EE Specification (WSEE) adds additional artifacts to those defined by JAX-RPC and brings JAX-RPC to the J2EE container. WSEE defines the required architecture for Web services for the Java 2 Platform Enterprise Edition (J2EE) environment. WSEE standardizes the packaging, deployment, and programming model for Web services in a J2EE environment. Although WSEE does not restrict any implementation, it only defines two: Stateless session EJB in an EJB container Java class running in a Web container 40

JAX-RPC Client A JAX-RPC client is capable of invoking a Web service irrespective of whether the service has been defined on the J2EE platform or on a non-java platform. JAX-RPC clients can run inside a J2EE container or as a stand-alone Java client. There are three types of Web services clients: Static stub Dynamic proxy Dynamic invocation interface (DII) 41

JAX-RPC Client Static Stub After the proxy classes have been generated, they are copied to the client machine. The client can then invoke the Web service based only on these proxy classes. These proxy classes are generated from the WSDL of the Web service. In WebSphere Application Server, the proxy classes can be generated by the tool <WAS_HOME>/bin/WSDL2JAVA. 42

JAX-RPC Client Static Stub, calling sequence 1. The client instantiates the service locator. 2. The client calls the service locator to retrieve the SEI (an instance of the client stub that implements the SEI is returned). 3. The client invokes a Web service through the SEI. 43

WSEE Client Static Stub, calling sequence 1. The client makes an JNDI lookup to get an instance of the service object, which implements a service interface. 2. The client uses a factory method of the service object to retrieve the client stub. The client stub implements the SEI. 3. The client invokes the Web service through the SEI. The configurations for the Web service client and server side are represented by the client and server deployment descriptor shown at the bottom 44

JAX-RPC Client Dynamic Proxy and DII Dynamic Proxy In dynamic proxy clients, the default destination of the Web service can be changed in the client by specifying a different destination in the client application. At runtime the service locator is instantiated. The SEI is retrieved using a destination (QName). Dynamic invocation interface (DII) - (limited support in WAS) DII is used when the WSDL of the Web service can change considerably over time. DII-based clients do not use proxy classes, but instead they read the entire WSDL file during runtime: Instantiate a DII service class. Instantiate a Call object (Call is a class provided by JAX-RPC). Populate the Call object. Invoke the Web service operation on the Call object. 45

WSEE Server Container responsability A server container provides a JAX-RPC runtime environment for invoking Web services ports. The container is responsible for: Listening to Web services SOAP HTTP requests Parsing the inbound message Mapping the messages to the implementation class and method Creating Java objects from the SOAP envelope Invoking the service implementation bean handlers and instance methods Capturing the response Mapping the Java response objects into a SOAP message Creating the message envelope Sending the message to the client 46

SOAP over HTTP request The client request to the Java proxy is handled by the SOAP client and is routed to the server over HTTP. In the server, the WebSphere SOAP engine calls a JavaBean Web service as a servlet, or uses a servlet in a Web router module to invoke an EJB Web service. 47

References http://www.redbooks.ibm.com 48

IBM Italia SpA Thank' you Marco Dragoni 2007 IBM Corporation