J2EE API and Services

From sheep
Revision as of 21:18, 14 September 2021 by Martin (talk | contribs) (Created page with "== JEE 5 API and Services == http://java.sun.com/javaee/technologies/ Image:overview-j2eeArchitecture.gif {| class="wikitable" border="1" cellspacing="0" cellpadding="5...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

JEE 5 API and Services

http://java.sun.com/javaee/technologies/

File:Overview-j2eeArchitecture.gif


EJB Container Web Container Application Client Container Applet Container
J2SE J2SE J2SE J2SE
JAX-RPC JAX-RPC JAX-RPC
JAX-WS JAX-WS JAX-WS
SAAJ SAAJ SAAJ
Web Services Web Services Web Services
WS Meta data WS Meta data WS Meta data
StAX StAX StAX
JAXR JAXR JAXR
JMS JMS JMS
Management Management Management
Java Persistence Java Persistence Java Persistence
Java Mail Java Mail
JAF JAF
JACC JACC
Connectors Connectors
JTA JTA
EJB
Java Server Faces
JSTL
Servlet
JSP
Application client
Applet

Services

J2SE

JAX-RPC

  • Web services SOAP 1.1
  • comparison to JAX-WS which is part of a series
  • 90% of schema type covered - remainder mapped to SOAPElement - own mapping
  • Synchronous

JAX-WS

  • Replaces JAX-RPC
  • Web services SOAP 1.1 and SOAP 1.2
  • 100% schema type covered uses JAXB
  • Supports asynchronous
  • Supports message oriented
  • dynamic server model
  • MTOM - (Message Transmission Optimization Mechanism) Web Services attachment specification for efficient transmission of binary data. Uses XOP (XML-binary Optimized Packaging)

SAAJ

Soap with Attachements API for Java

  • Basis for JAX-RPC and JAX-WS low level API
  • Support SOAP messaging (asynchronous)

Web Services

WS Meta data

used with WS-Addressing, WSDL and WS-Policy for discovery about web service end point

  • aids self configuration
  • allows automated client

StAX

Streaming API for XML

  • Pull based streaming API for XML
  • Reading/writing

JAXR

Java API for XML Registries

  • supports interacting with registries such as ebXML Registry and UDDI
  • based on SAAJ
  • can be used to exchange XML documents stored in registries

JMS

Java Message Service

  • Asynchronous messaging
  • Supports transactions

Models:

  • Publish subscribe
  • Point to point

Loosely coupled, reliable

Business component

Management

Java Persistence

  • standards based object to relational mapping
  1. javax.persistence - API
  2. Java Persistence Query Language - similar to SQL but operates on objects
  3. Object/Relational mapping

SDO Service Data Object

Complimentary - for service oriented architecture - supports data formats other than relational models - OASIS spec (previously Web Data Objects)

  • supports meta data so can represent object graph

Java Mail

Mail API for sending SMTP and reading mail from IMAP/POP Built with JAF

JAF

JavaBeans Activation Framework

  • Enables finding the type of a piece of data, locate the object to encapsulate it and discover methods.
  • Supports dynamic registering of types and actions
  • Creates appropriate Java Bean component to perform operations

used in Java Mail libraries to deserialise attachments in the mail to objects

Connectors

JCA Java EE Connector Architecture

  • for tools vendors ans system integrators

Resource adaptors to support EIS

  • one per EIS/DB type
  • interacts with JEE resource manager
  • performance oriented, secure, scalable, message baseed
  • supports transactions, integration of web services to EIS
    • JAX-WS and JAC complimentary technologies for EAI (Enterprise Application Integration)
  • may be synchronous or asynchronous

JDBC

Java DataBase Connectivity API

  • For Invoking QSL from java
  • can be used from JSP/Servlet or EJB

Must conform to two specifications:

  1. Application API
  2. Service provider interface for resource manager

JTA

Java Transaction API

  • demarcation of transaction boundaries
  • allows multiple resources to participate
  • based on open API - X/Open XA

Default commit on one update - allows wrapping multiple updates

Transaction manager (Transaction Processing monitor - TP monitor)

  • Interacts with the resource manager
    • API for container
  • Client interacts to begin/commit/rollback transaction
    • API for client (separate from container)

Java Server Faces

Interface framework based on MVC

  • JSP for display with custom tag libraries
  • event model
  • state management
  • java beans with dependency injection
  • expression language

Supports:

  • input validation
  • page navigation configuration
  • managed model object creation
  • data conversion between objects/components

Rendering model supporting different markup languages

  • Renderkit - HTML 4.01

JSTL

JavaServer Pages Standard Tag Library

  • extends JSP adding a tag library

includes:

  • loops
  • xml processing
  • conditional constructs
  • internationalisation
  • functions - string manipulation
  • database

Servlet

Request response programming

JSP

Now includes expression language (JSP 2.1) - simple way to access data objects

  • deferred expressions - not immediatly evaluated
  • set and get expressions - ability to access server side
  • method expressions

Mixes static data - html/xml/wml & jscp - scripting code for dynamic page construction

JACC

Java Authorization Contract for Containers

Allows third party authorisation tools to decide on access to J2EE resources

Authenticated user makes a request to a web or a EJB resource

  • security runtime decides on access. (access decision)
  • JACC defines the permission object to be created
  • policy context handlers are registered
  • policy context identifier (contextID) is set
  • call to the java.security.Policy implemented by the provider - makes the access decision

EJB

Three types of Enterprise Beans

  • Session Beans
    • transient conversation with client
  • Entity Beans
    • replaced by Java Persistence API
    • persistence manager responsible for data being stored
  • Message Driven Beans
    • asynchronous business component

JAXP

Java API for XML Processing

  • processing via DOM

supports:

  • SAX - Simple API for XML
  • XSLT
  • namespaces/schemas

JNDI

Java Naming Directory Interface

  • Common API to access LDAP, NDS, DNS, NIS
  • Setting attributes or objects
  • Searching for object by attributes
  • can be configured by JNDI naming context and environment
    • e.g. can change DB without change to source code
  • includes system objects such as JTA for user transactions
  • should exist in naming context e.g. java:/comp/env/ejb java:/comp/env/jdbc
  • relationship to JAX-R
    • The JAXR API needs richer metadata capabilities for classification and association, as well as richer query capabilities.

JAAS

Java Authentication and Authorisation Service

  • allows a java app to authenticate and authorise user or group
  • is a instance of PAM - Pluggable Authentication Module
    • extends java security architecture to support user based authentication