ILP J2EE Stream J2EE 01 Introduction V0.3

Embed Size (px)

Citation preview

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    1/27

    J2EE Overview

    Version 1.0.

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    2/27

    September 3, 2009TCS Internal

    Course Objective

    The Objective of J2EE course are:

    To understand multi-tiered enterpriseapplications.

    To understand J2EE framework fordeveloping enterprise applications.

    To understand various components ofJ2EE like JSP, Servlets, EJB etc. andeffectively use them.

    To understand Application Server and itsconfigurations.

    To learn and deploy web basedapplications in application server.

    To learn supporting technologies like

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    3/27

    September 3, 2009TCS Internal

    What is WWW

    The WWW incorporates all of the Internet

    services above and much more.You can retrieve documents, view images,animation, and video, listen to sound files,

    speak and hear voice, and view programsthat run on practically any software in theworld, provided your computer has thehardware and software to do these things.

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    4/27

    September 3, 2009TCS Internal

    How does WWW work

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    5/27

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    6/27

    September 3, 2009TCS Internal

    HTTP Communication

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    7/27

    September 3, 2009TCS Internal

    HTTP CommandsGET - retrieves the resource identified by

    the request URL.HEAD - returns the headers identified bythe request URL.

    POST - sends data of unlimited length to

    the Web server.

    PUT - stores a resource under the requestURL.

    DELETE - removes the resource identifiedby the request URL.

    OPTIONS - returns the HTTP methods theserver supports.

    TRACE - returns the header fields sent withthe TRACE request.

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    8/27

    September 3, 2009TCS Internal

    HTTP Request

    An HTTP request is sent by the browser toserver. It will have the command, therequested object, protocol, and anyadditional attribute passed along with the

    object.

    Command

    Protocol/

    Version

    Component/

    Object

    Eg: GET /reports/sales/index.html HTTP/1.0

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    9/27

    September 3, 2009TCS Internal

    HTTP ResponseAn HTTP message sent by a server to aclient is called an HTTP response. The initialline of an HTTP response is called the statusline.

    It has three parts, separated by spaces: the

    HTTP version, a response status code thattells the result of the request, and anEnglish phrase describing the status code.HTTP/1.0 200 OK

    Date: Tue, 01 Dec 2001 23:59:59 GMT

    Content-Type: text/html

    Content-Length: 52

    Hello, John!

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    10/27

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    11/27

    September 3, 2009TCS Internal

    J2EE

    Java 2 Platform, Enterprise Edition (J2EE)

    defines the standard for developingcomponent-based multi-tier distributedenterprise applications.

    AJ2EE componentis a self-containedfunctional software unit that is assembledinto a J2EE application along with relatedcomponents.

    An enterprise-level platform for developingportable, secure, scalable, distributed, multi-tier business applications.

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    12/27

    September 3, 2009TCS Internal

    J2EE (contd.)

    Application logic is divided into components

    according to functionThe various application components thatmake up a J2EE application are installed ondifferent machines depending on the tier inthe multitiered J2EE environment to whichthe application component belongs

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    13/27

    September 3, 2009TCS Internal

    J2EE Multi-tier Framework

    EJB Container

    JSP/ServletContainer

    WEB CLIENT

    Database/Legacy Systems

    ANY CLIENTClient

    Tier

    EIS Tier

    Web

    Tier

    Business

    Tier

    Client

    Machine

    J2EE

    Server

    DatabaseServer /

    Legacy

    Server

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    14/27

    September 3, 2009TCS Internal

    J2EE ArchitectureCLIENTSCLIENTS

    TIERTIER

    External Clientsfrom INTERNET

    (Browsers , WAPetc.) Applets

    Internal Clientsfrom INTRANET

    (Browsers , Desktop

    Applications etc.)

    Applets,Javabeans

    BACK ENDBACK END

    TIERTIER

    J2EE WEB APPLICATION SERVER TIERJ2EE WEB APPLICATION SERVER TIER

    PRESENTATIONPRESENTATIONLOGICLOGIC

    (Web Components)

    BUSINESS LOGICBUSINESS LOGIC(EJB Container )

    ENTERPRISE SERVICES

    HTML

    JDBC

    XML

    SERVLETS

    JSP

    WML

    EJB EJB

    EJB EJB

    EJBEJB

    JNDI JMS JTS

    RMI - IIOP

    Enterprise

    Information

    Systems

    (Databases,

    ERP,

    Legacy

    Systems)

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    15/27

    September 3, 2009TCS Internal

    J2EE offerings for Developer

    Java Server Pages

    JavaMail API

    Enterprise Java

    Beans

    Java Authentication &

    Authorization Service

    Java Naming &

    Directory Interface

    JAXP JAXB JAXR JAXRPC

    Java Servlet

    Technology

    JDBC Java Message Service

    J2EE

    Java Transaction API

    & Service

    JTA + JTSSAAJ (Web Services)

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    16/27

    September 3, 2009TCS Internal

    J2EE Application Components

    J2EE applications comprises variouscomponents.Client Components

    Built using applets which runs onclient machine

    Web CompoentsBuilt using Java Servlet technology

    and JSP technology which runs onserver.

    Business CompnentsBuilt using EJB technolgy which

    runs on server.

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    17/27

    September 3, 2009TCS Internal

    Web Components

    J2EE Web components can be either servlets

    or JSP pagesServlets are Java programming languageclasses that dynamically process requestsand construct responses.

    JSP pages are text-based documents thatexecute as servlets but allow a more naturalapproach to creating static content

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    18/27

    September 3, 2009TCS Internal

    Web Components (cont..)

    Static HTML pages and applets are bundled

    with Web components during applicationassembly, but are not considered Webcomponents by the J2EE specification.

    Server-side utility classes can also bebundled with Web components and, likeHTML pages, are not considered Webcomponents.

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    19/27

    September 3, 2009TCS Internal

    Web Tier

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    20/27

    September 3, 2009TCS Internal

    Business Components

    Business code, which is logic that solves or

    meets the needs of a particular businessdomain such as banking, retail, or finance, ishandled by enterprise beans running in thebusiness tier.

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    21/27

    September 3, 2009TCS Internal

    Business Tier

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    22/27

    September 3, 2009TCS Internal

    EIS TierThe enterprise information system tier

    handles enterprise information systemsoftware and includes enterpriseinfrastructure systems such as enterpriseresource planning (ERP), mainframe

    transaction processing, database systems,and other legacy information systems.

    Related APIs

    JCA , JDBC , JMS , Web Services etc

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    23/27

    September 3, 2009TCS Internal

    J2EE Containers

    What is a ContainerContainers are the interface between a

    component and the low-level platformspecific functionality that supports the

    component.How does it work

    Container settings are specified for eachcomponent during assembly process before

    deployment.What do I get

    Support for security, transactionmanagement, JNDI lookup, Remote

    connectivity.

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    24/27

    September 3, 2009TCS Internal

    J2EE Containers (cont..)

    Manage life cycle ofobjects

    Manage transactions

    Provide securityResource

    optimization

    DB pooling

    Compiled JSPCaching

    Persistence support

    CMP (EJB-QL)

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    25/27

    September 3, 2009TCS Internal

    J2EE Roles & Responsibilities

    J2EE Product ProviderBuilds Compliant products

    IBM Websphere

    JBossApplication Component Provider

    Develops the application jsp, servlet, ejb

    etc.Application Assembler

    Resolves dependencies, Deliver deployableapp.

    J2EE R l & R ibiliti

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    26/27

    September 3, 2009TCS Internal

    J2EE Roles & Responsibilities(cont..)

    DeployerConfigures resources

    DB, Roles, Users, etc.

    System Administrator / Production SupportRuntime monitoring, Network

    administration, Support

    Tool Provider

    Provides helper tools for managing,deploying, developing, packaging.

  • 8/14/2019 ILP J2EE Stream J2EE 01 Introduction V0.3

    27/27

    September 3, 2009TCS Internal

    Reference

    Stephanie Bodoff, et. al., The J2EE Tutorial,

    Sun Microsystems.James Mc Govern, et. al., J2EE 1.4. Bible.