J2EE 1.4

JAX-RPC - APIs for representing WSDL-based services as RPCs in Java (and vice-versa). ▫ JSR 109 - Web services programming and deployment model.
222KB taille 23 téléchargements 282 vues
Changes in J2EE V1.4 Platform

Unit Objectives This unit will discuss: •J2EE 1.4 Overview –Enterprise Application Packaging and files –Servlet 2.4 –JSP 2.0 –JCA 1.5 –EJB 2.1 •Web Services

Application Programming Model Support •Supported J2EE Application versions in V6 Application Server –J2EE 1.4 –J2EE 1.3 –J2EE 1.2 •Makes a much better migration story by allowing your existing J2EE 1.2 or 1.3 applications to run in V6 Application Server

J2EE 1.4 Web Services and XML support

ISV Enablement

ƒ Standards / Portability - XML Schema definitions for all deployment descriptors ƒ JAX-P 1.2 - New properties for XML parsers ƒ JAX-R - XML registry API ƒ JAX-RPC - APIs for representing WSDL-based services as RPCs in Java (and vice-versa) ƒ JSR 109 - Web services programming and deployment model ƒ SAAJ 1.1 - SOAP Attachments API for Java

ƒ JMX 1.2 / JSR-077 (J2EE Management) ƒ Notification emitters, and standard patterns ƒ Information model representing J2EE application server concepts ƒ JSR-088 (J2EE Deployment) ƒ XML-based deployment interfaces for J2EE ƒ JACC 1.0 ƒ Java Authorization Contract with Containers ƒ APIs for registering J2EE component authorization policies

Pluggable Messaging ƒ EJB 2.1 ƒ Typed message beans (used for any inbound JCA including pluggable JMS provider) ƒ Timer service Web service end-point support ƒ JMS 1.1 ƒ Unification of point-to-point and pub-sub interfaces ƒ J2CA 1.5 ƒ In-bound connections (supporting pluggable JMS provider, generalized for other types) ƒ RA lifecycle support ƒ Work manager (threads for resource adapters)

Other ƒ Servlet 2.4 ƒ Extensible deployment descriptors ƒ Request/response listeners ƒ JSP 2.0 ƒ Expression Language ƒ Simple Tag Extension ƒ JDBC 3.0 ƒ Meta data and cursor support ƒ JavaMail 1.3 updates

J2EE 1.4 Platform Architecture

Source: J2EE 1.4 Specification

J2EE 1.4 New Features Overview •Deployment Descriptors –Defined as XML schemas instead of DTDs •Major new features in: –Servlet 2.4 and JSP 2.0 •Expression Language support in JSP 2.0

–EJB 2.1 •EJB Timer Service •Support for Web Services •Extended Message-Driven beans (MDBs)

–JCA 1.5 •Inbound communication using the extended MDBs

J2EE 1.4 Application Components Deployment Descriptor

Web Module (WAR)

EJB Module (JAR)

Resource Adapter (RAR)

Session HTML

Application Client Module (JAR) Main Class

Java beans

Servlet/JSP

Deployment Descriptor

Entity

RA Java Classes MDB

Deployment Descriptor

Runs in Application Server

Deployment Descriptor

RA Java Classes

Deployment Descriptor Runs in Application Client Container

J2EE 1.4 Packaging Changes •Web services now defined in J2EE application deployment descriptors –Eliminate webservicesclient.xml –References to Web services are contained in the web.xml, ejb-jar.xml, and application-client.xml files as service-refs –No changes to IBM specific Web services Client bindings or extensions files

Packaging Files and Changes

Installed RARs Schema Map Schema Attributes

EJB Module JAR file

Table Creation

EJB DD EJBs

Web Services Client DD

WSDL Java Mapping Files

HTML, GIFs, etc.

WS IBM Bind/Ext WS Client IBM Bind/Ext

Client Module JAR file

IBM Bind/Ext

Client DD

IBM Bind Web Services DD

Servlet JSP

IBM Bind/Ext

was.policy (Java2 Sec)

Web Module WAR file

Web DD Web Services DD

IBM Bind/Ext

Application DD

J2EE Application EAR file

WSDL Java Mapping Files

WS IBM Bind/Ext WS Client IBM Bind/Ext

Web Services Client DD

WS Client IBM Bind/Ext

WSDL Java Mapping Files

Client Classes

Web Services Client DD

DD = Deployment Descriptor WS = Web Services Bind = Binding File Ext = Extension File = WS related file = File removed in J2EE 1.4

Servlet 2.4 New Features Overview •Servlet 2.4 –RequestDispatcher –Filters –Listeners –ServletRequest –Sessions –Internationalization

Sessions – New Features •Session timeout can be specified in the deployment descriptor. •The container will define its own timeout, if it is not specified in deployment descriptor. –WebSphere’s default is 30 minutes •The value specified in the deployment descriptor will override the value specified by WebSphere. •Use AST’s deployment descriptor editor for Dynamic Web Projects, General page. 60 Timeout after 60 minutes

Will never timeout

0

JCA 1.5 – New Features •Inbound Communication –Allows external EIS systems to communicate with the application components deployed on the Application Server •Transaction Inflow –Allows a Resource Adapter to propagate an existing two-phase transaction into an Application Server •Message Inflow –Generic contract to plug-in a variety of Message Providers into an Application Server

New Features Overview (continued) •Management and Deployment APIs –JSR 77 – J2EE Management 1.0 API defines J2EE management –JSR 88 – J2EE Deployment 1.1 API provides a standard API for deploying J2EE applications •Security –Java Authorization Service Provider Contract for Containers (JACC) •Allows custom authorization service providers to be plugged into the Application Server

– JSR 115 : Java Authorization Contract for Containers

EJB Timer Service •EJBs use the container’s Timer Service implementation to create and set Timer objects •To receive notifications of Timeout events, each enterprise bean should implement the TimedObject interface •When the Timer expires, the container’s Timer Service invokes the associated EJB’s ejbTimeOut() method

EJB Container

EJBContext 1. getTimerService()

Enterprise Java Bean

2. createTimer(…)

TimerService

3. ejbTimeout(…)

implements TimedObject Interface

Implemented by the EJB Container

EJB 2.1 and Web Services •External Web Services can now be invoked from an EJB using service references •Defines a new EJB interface called the endpoint interface to expose an EJB’s functionality as a Web Service •Web Services use the SOAP stateless protocol, and hence EJB 2.1 allows the usage of only the stateless session bean as a Web Service •JAX-RPC is used to enable accessing a stateless session bean, using SOAP protocol

Changes in Web Services WebSphere V4 and V5.0

WebSphere V5.02, V5.1

Apache SOAP

JAX-RPC (JSR-101) 1.0

ƒ The programming model, deployment model and engine

ƒ New standard API for programming Web services in Java

Proprietary APIs

JSR-109 1.0

WebSphere V6

JAX-RPC (JSR-101) 1.1

ƒ Additional type support ƒ xsd:list ƒ Fault support ƒ Name collision rules ƒ New APIs for creating Services ƒ isUserInRole()

JSR-109 - WSEE

ƒ Because Java standards for Web services didn’t exist

ƒ New J2EE deployment model for Java Web services

Not WS-I compliant

WS-Security

ƒ Moved to J2EE 1.4 schema types ƒ Migration of web services client DD moving to appropriate container DDs ƒ Handlers support for EJBs ƒ Service endpoint interface (SEI) is a peer to LI/RI

ƒ Extensions added

SAAJ 1.2

SAAJ 1.1

WS-I Basic Profile 1.0 ƒ Profile compliance

UDDI4J version 2.0 (client) Apache Soap 2.3 enhancements The engine is a new high performance SOAP engine supporting both HTTP and JMS

ƒ APIs for manipulating SOAP XML messages ƒ SAAJ infrastructure now extends DOM (easy to cast to DOM and use)

WS-Security ƒ WSS 1.0

ƒ Following WS-I Security Profile

WS-I Basic Profile 1.1 ƒ Attachments support

WS-TX (WS transactions) JAXR support UDDI V3 support

ƒ Includes both the registry implementation and the client API library ƒ Client UDDI V3 API different than JAXR (exposes more native UDDI V3 functionality not available in JAXR)

Unit Summary •Building on the latest Java standards and Web Services in an integrated development and deployment environment to reduce time to value. •Introducing J2EE 1.4 while supporting 1.3 and 1.2. •Continuing investment in emerging standards.

Reference •J2EE 1.4 Spec • http://java.sun.com/j2ee/download.html#platformspec

•CommonJ • http://www.ibm.com/developerworks/library/j-commonj-sdowmt/