Overview of J2EE - PowerPoint PPT Presentation

1 / 51
About This Presentation
Title:

Overview of J2EE

Description:

... code to be placed in text based files (html, xml, wap, etc). JMS ... Java API for XML-based RPC (JAX-RPC) ... XML-based data interchange integration with JAXP ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 52
Provided by: patrick99
Category:

less

Transcript and Presenter's Notes

Title: Overview of J2EE


1
Overview of J2EE
  • Distributed Multitiered Applications

2
What Well Cover
  • Distributed Multitiered Applications
  • J2EE Components
  • J2EE Clients
  • Web Components
  • Business Components
  • Enterprise Information System Tier

3
Distributed Multitiered Applications
  • Application logic divided into components
    according to function
  • Components installed on machines according to
    tier
  • J2EE considered three tier three locations
  • Place multithreaded application server between
    client and back-end

4
Two examples
5
J2EE Components
  • a self-contained functional software unit that is
    assembled into a J2EE application with its
    related classes and files and that communicates
    with other components
  • 3 types app clients/applets, servlets/jsps,
    EJBs
  • Standard Java classes assembled into J2ee
    applications and deployed to J2EE server

6
J2EE Clients
  • Web Clients web pages generated by web
    components in the web tier and browser thin
    client
  • Applets Java programs executed in JVM in
    browser
  • J2EE Application Clients
  • JavaBeans manage data flow not J2EE components

7
Example J2EE Server Communication
  • Client communicates directly or through
    JSP/Servlet
  • Trade-offs
  • Thin client easier to distribute, deploy and
    manage
  • Thick client better user experience

8
Web Components
  • Servlets Java classes that process requests
    (usually HTTP) and generate responses
  • JSPs text based documents that execute as
    servlets
  • Static HTML/Applets assembled with Web components
    but not part of J2EE Web components

9
Business Components
  • Meets the needs of a particular business domain
  • Not presentation logic rules of what data is
    available, not how it is displayed
  • What data may be changed according to what rules,
    not what the screen looks like

10
Example Business Tier
11
Enterprise Information Tier
  • Enterprise Infrastructure System/software
  • Enterprise Resource Planning (ERP) (like
    PeopleSoft, JD Edwards, etc)
  • Mainframe transactions
  • Database Systems

12
What We Covered
  • Distributed Multitiered Applications
  • J2EE Components
  • J2EE Clients
  • Web Components
  • Business Components
  • Enterprise Information System Tier

13
Overview of J2EE
  • J2EE Containers

14
What Well Cover
  • Why Containers?
  • Container Services
  • Container Types
  • Packaging

15
Why Containers
  • Thin client multi-tiered applications can be very
    complex
  • Transactions
  • State Management
  • Multithreading
  • Resource Pooling
  • Other low level details (interaction with server
    resources)
  • J2EE Containers provide these services

16
Container Services
  • Container interface between Components and
    low-level services
  • Assembly process specifies container settings for
    the J2EE application
  • Highlights security model, transaction model,
    JNDI, Remote connectivity
  • Same application behaves differently on different
    servers
  • Non-configurable services, life-cycle, connection
    pooling, etc.

17
Container Types
  • J2EE Server EJB and Web containers
  • EJB container
  • Web container
  • Application Client container
  • Applet Container

18
J2EE Containers
19
Packaging
  • EAR files assemble components
  • J2EE Module 1 or more J2EE components
    descriptor
  • Deployment descriptor xml that describes
    deployment settings
  • EJB modules jar file with EJB classes DD
  • Web modules war file with JSPs, servlets,
    images, etc DD
  • Resource Adaptor modules rar file with DD
  • Application client modules

20
What We Covered
  • Why Containers?
  • Container Services
  • Container Types
  • Packaging

21
Web Services Support
  • Web based enterprise applications

22
What Well Cover
  • Extensible Markup Language
  • HTTP-SOAP Transport Protocol
  • WSDL Standard Format
  • UDDI and ebXML Standard Formats

23
Extensible Markup Language
  • cross-platform, extensible, and text-based
    standard for representing data
  • Create own tags/stylesheets
  • Example company price lists
  • Translate to html for web
  • Create a marketing presentation
  • Read into an app for processing

24
HTTP-SOAP Transport Protocol
  • Simple Object Access Protocol running over HTTP
    connections
  • Completely interoperable exchange clients,
    webservices, platforms, locations
  • XML based protocal that follows HTTP
    request/response model
  • The SOAP portion provides XML-based
  • Envelope to describe message and how to process
  • Encoding rules for app-defined data types
  • Convention for representing request/response

25
WSDL Standard Format
  • XML format for describing network services
  • Provides
  • Name of Service
  • Location of Service
  • How to communicate with the service
  • Published on Web or in UDDI registry
  • J2EE has tool for generating WSDL

26
UDDI and ebXML Standard Formats
  • Universal Description, Discovery, and Integration
    (UDDI)
  • www.uddi.org
  • a "meta service" for locating web services by
    enabling robust queries against rich metadata
  • Electronic Business using eXtensible Markup
    Language
  • www.ebxml.org
  • Modular suite of specs for message
    exchange/business processes

27
What We Covered
  • Extensible Markup Language
  • HTTP-SOAP Transport Protocol
  • WSDL Standard Format
  • UDDI and ebXML Standard Formats

28
Development Roles
  • Different people can perform different parts of
    the process

29
What Well Cover
  • J2EE Product Provider/Tool Provider
  • Application Component Provider
  • Application Assembler
  • Application Deployer and Administrator

30
J2EE Product Provider/Tool Provider
  • Reusable modules make it possible to divide
    dev/deployment into roles
  • Product provider - platform, APIs, and other
    features defined in the J2EE specification
    usually OS, RDBMS, App server providers
  • Tool Provider - development, assembly, and
    packaging tools used by component providers,
    assemblers, and deployers.

31
Application Component Provider
  • Enterprise Bean Developer
  • Writes and compiles the source code
  • Specifies the deployment descriptor
  • Bundles the .class files and deployment
    descriptor into an EJB JAR file
  • Web Component Developer
  • Writes and compiles servlet source code
  • Writes JSP and HTML files
  • Specifies the deployment descriptor for the Web
    component
  • Bundles the .class, .jsp, .html, and deployment
    descriptor files in the WAR file
  • J2EE Application Client Developer
  • Writes and compiles the source code
  • Specifies the deployment descriptor for the
    client
  • Bundles the .class files and deployment
    descriptor into the JAR file

32
Application Assembler
  • receives application component JAR files from
    component providers and assembles them into a
    J2EE application EAR file.
  • Specifies the deployment descriptor for the J2EE
    application
  • Verifies that the contents of the EAR file are
    well formed and comply with the J2EE specification

33
Application Deployer and administrator
  • Administers network/oversees runtime
  • sets transaction controls, security attributes,
    DB connections
  • Installs/configures applications
  • Puts EAR file on server
  • Modifies DD as necessary
  • Verifies well-formed EAR
  • Installs Applications

34
What We Covered
  • J2EE Product Provider
  • Tool Provider
  • Application Component Provider
  • Application Assembler
  • Application Deployer and Administrator

35
J2EE APIs
  • The pieces that make it work

36
What Well Cover
  • JDBC API
  • Java Servlet Technology
  • JavaServer Pages Technology
  • Java Message Service
  • Java Naming and Directory Interface
  • Java Transaction API
  • JavaMail API
  • JavaBeans Activation Framework

37
What Well Cover (continued)
  • Java API for XML Processing
  • Java API for XML Registries
  • Java API for XML-Based RPC
  • SOAP with Attachments API for Java
  • J2EE Connector Architecture
  • Java Authentication and Authorization Service
  • Simplified Systems Integration

38
JDBC
  • JDBC invoke SQL commands from Java
  • Use for bean-managed persistence, Session bean
    access to DB or from servelet/JSP
  • Not necessary for CMP
  • Two parts application level interface (standard
    api) and Service Provider Interface (to attach
    drivers)

39
Servlets/JSPs
  • Extend server capabilities through
    request/response
  • Most often used to extend Web applications
  • JSPs allow servlet code to be placed in text
    based files (html, xml, wap, etc).

40
JMS
  • JMS is the Java MOM
  • Topics and Queues
  • Queues are point to point
  • Topics are publish/subscribe
  • Durable subscribers
  • Specification of Queues or Topics

41
JNDI
  • Java Naming and Directory interface
  • methods for performing standard directory
    operations, such as
  • associating attributes with objects
  • searching for objects using their attributes
  • store and retrieve any type of named Java object.
  • InitialContext looks up in servers naming
    context - javacomp/env
  • Store DataSource, EJB, etc references
  • JNDI can access multiple naming/directory
    services
  • Can access LDAP, DNS, etc.

42
JTA/Java Main/Activation
  • Java Transaction API standard interface for
    demarcating transactions
  • J2EE provides default autocommit, but can use JTA
    to keep transaction open across DB calls
  • Java Mail to send emails
  • JavaBeans Activation Framework - used by Java
    Mail
  • Determine type of data
  • Encapsulate it
  • Discover operations on it
  • Provide correct Java beans for using it

43
JAXP
  • Java API for XML Processing (JAXP)
  • Supports Document Object Model (DOM), Simple API
    for XML parsing (SAX) and XML Stylesheet Language
    Transformation (XSLT)
  • Independent of XML processing implementation
  • Provides namespace support work with schemas
    that might have conflicts.

44
Java API for XML Registries (JAXR)
  • access business and general-purpose registries
    over the Web.
  • supports the ebXML Registry/Repository standards
    and UDDI specifications
  • Single API to access both
  • Can use to access schemas stored in registries

45
Java API for XML-based RPC (JAX-RPC)
  • Uses SOAP and HTTP so clients can make RPC calls
    over the internet
  • Also supports WSDL
  • Can use Secure Socket Layer (SSL) and Transport
    Layer Security (TLS) protocols to establish basic
    or mutual authentication.

46
SAAJ
  • SOAP with Attachments API for Java (SAAJ)
  • low-level API upon which JAX-RPC depends
  • enables the production and consumption of
    messages that conform to the SOAP 1.1
    specification and SOAP with Attachments
  • Developers will probably use JAX-RPC

47
J2EE Connector Architecture
  • A resource adapter is a software component that
    allows J2EE application components to access and
    interact with the underlying resource manager.
  • Resource adapters are specific to resource
    managers
  • typically different resource adapter for each
    type of enterprise information system.

48
JAAS
  • Java Authentication and Authorization Service
    (JAAS)
  • J2EE applications can authenticate and authorize
    user or user groups.
  • Based on Pluggable Authentication Module (PAM)
    framework

49
Simplified Systems Integration
  • J2EE APIs enable integration through
  • Unified application model across tiers
  • Simplified response and request with JSP and
    servlets
  • Reliable security model with JAAS
  • XML-based data interchange integration with JAXP
  • Simplified interoperability with the J2EE
    Connector Architecture
  • Easy database connectivity with the JDBC API
  • Enterprise application integration with
    message-driven beans and JMS, JTA, and JNDI

50
What We Covered
  • JDBC API
  • Java Servlet Technology
  • JavaServer Pages Technology
  • Java Message Service
  • Java Naming and Directory Interface
  • Java Transaction API
  • JavaMail API
  • JavaBeans Activation Framework

51
What We Covered (continued)
  • Java API for XML Processing
  • Java API for XML Registries
  • Java API for XML-Based RPC
  • SOAP with Attachments API for Java
  • J2EE Connector Architecture
  • Java Authentication and Authorization Service
  • Simplified Systems Integration
Write a Comment
User Comments (0)
About PowerShow.com