Learning Center
Plans & pricing Sign in
Sign Out

Java 2 Enterprise Edition


									Java 2 Enterprise Edition

            An Introduction


             What is J2EE?
             Evolution of Distributed Transactional Computing
             Why J2EE?
             J2EE
               –   Deliverables (what and why?)
               –   Basic Architecture
               –   Components and Containers
               –   Roles
               –   Lifecycle

Introduction to J2EE            (c)CDAC(Formerly NCST)           2


             A collection of enterprise technologies
             Provides a component based approach to the design,
              development, assembly and deployment of enterprise
             An open industry standard (initiative led by Sun Microsystems)

                       J2EE enables solutions for developing, deploying and
                       managing n-tier sever-centric enterprise applications

Introduction to J2EE              (c)CDAC(Formerly NCST)                       3


             To provide a platform-independent, portable, multiuser,
              secure, and standard enterprise-class platform for
              server side deployments written in the Java Language

             Implement a standardized execution environment for
              distributed enterprise applications

Introduction to J2EE        (c)CDAC(Formerly NCST)                      4

         Evolution of Distributed
         Transactional Computing

             Overview of technologies leading to distributed
               –   1 tier, 2 tier, 3 tier, n tier architecture
             Distributed objects
             Application Servers

Introduction to J2EE               (c)CDAC(Formerly NCST)        5

         Single tier application

             Dumb terminal

                                                         Main frames

              Data access, presentation and business logic, all tightly coupled
               in one monolithic application

Introduction to J2EE            (c)CDAC(Formerly NCST)                             6

         Client/Server architecture

                                   Database Specific APIs


             Presentation, business and data model processing logic into client
             Server is typically a database server
             Client sends SQL statements, retrevies raw data

Introduction to J2EE             (c)CDAC(Formerly NCST)                            7

         Client/Server architecture

             Fat Clients
               –   Data model tighly coupled with each client ( a change in
                   schema will require making changes in every client )
               –   Clients use database APIs for communication/transactions etc.
               –   All processing at the client end
               –   Issues – Scalability, Performance, Security, Reuse,

Introduction to J2EE            (c)CDAC(Formerly NCST)                             8

         Three-tier architecture


                                                    Database Specific   Database
                                                        APIs calls       Server

             Thin clients, business logic moves to middle tier
             Separates UI, business logic and data model
             Middle tier serves the business logic as “Services”
             Explict management of multi-threading, concurrency, transactions,
              security etc. required

Introduction to J2EE            (c)CDAC(Formerly NCST)                             9

         Distributed Object architecture

                       IIOP, RMI, DCOM                               Database Specific Database
                                                                         APIs calls     Server

                                               Distributed Objects

             Business logic and data model as distributed objects (solutions
              available from Java RMI-IIOP, CORBA, Microsoft .NET)
             Uses object request protocols – IIOP, RMI, DCOM/COM+
             Middle tier handles – concurrency, multi-threading, connection
              pooling etc.
             Still, can be difficult to program
Introduction to J2EE              (c)CDAC(Formerly NCST)                                          10

         Adding Web tier

                JSP/Servlets,            IIOP, RMI,                        Database
                  ASP, CGI              COM, DCOM                           Server

                                Web Server            Application Server

             Distributed computing became ubiquitous with Web-
             CGI/Perl – difficult to maintain, scalability issue
             A mixture of different technologies, difficult to maintain/manage
             Proprietary solutions limit exploration

Introduction to J2EE            (c)CDAC(Formerly NCST)                                11

         Moving from 1-tier to n-tier

             Distinct separation of responsibilities
             Change in a specific tier possible without disturbing
              other tiers - easier maintenance, deployment
             Reusable, flexible, scaleable
             However,
               –   Requires developer to worry details of distributed protocol,
                   security, load balancing, concurrency, transactions, resource
                   management …

Introduction to J2EE             (c)CDAC(Formerly NCST)                            12

         N-tier J2EE Architecture

                                                       EJB Application Server

     Application                                                                 Database Server
       Client                                                                       (RBDMS)


                                          Web Server
     Web-Client                                                                   Legacy Systems

Introduction to J2EE                    (c)CDAC(Formerly NCST)                                     13

         The Java 2 Platform

           Hand-held                                            Workgroup            High-end
            devices                    Desktop                   Servers             Servers

                       Micro Edition             Standard Edition
                          (J2ME)                     (J2SE)            Enterprise Edition

Introduction to J2EE                   (c)CDAC(Formerly NCST)                                   14

         J2EE Bundle

             APIs and technology specification
               –   A collection / integration of various enterprise APIs
             Development and Deployment platform
               –   A unified platform for server-side development
             Reference Implementation
               –   Implements the J2EE specification & demonstrates its viability
             Compatibility tests
               –   Certifies a J2EE product, confirms application portability
             J2EE Blueprints
               –   Programming model, patterns, guidelines, best practices

Introduction to J2EE              (c)CDAC(Formerly NCST)                            15

         J2EE Technologies

             Component Technology
               –   Applet, application clients, Enterprise beans, web components
                   (JSP / Servlets)
             Service Technology
               –   JDBC, JNDI, JTS, Connector Architecture, Web Services etc
             Communication Technology
               –   RMI-IIOP
               –   Internet protocols (HTTP, SSL, TCP/IP)
               –   Messaging (JMS, JavaMail)

Introduction to J2EE             (c)CDAC(Formerly NCST)                        16

         J2EE APIs (Bundled)

             Java 2 SDK
               –   Java Standard APIs (part of J2SE)
             Enterprise JavaBeans (EJB)
               –   Aritecture for building server-side components
             Java Remote Method Invocation (RMI) & RMI-IIOP
               –   Method invocation across Java virtual machines. Can also integrate
                   with other clients comfirming CORBA IIOP specification
             Java Naming and Directory Interface (JNDI)
               –   Naming service for locating resources over the network
             Java Database Connectivity (JDBC)
               –   Java interface to relational database
             Java Servlets & Java Server Pages (JSP)
               –   Technology allowing dymanic web content generation
             Java Activation Framework (JAF)
             J2EE Connector Architecture

Introduction to J2EE               (c)CDAC(Formerly NCST)                               17

         J2EE APIs (Bundled) contd …

             Java Messaging Service (JMS)
               –   Enables asyncronous communication, including point-to-point and
                   publish/subscribe messing
             Java IDL
               –   Java technology based CORBA ORB implementing a subset of
                   CORBA specification
             JavaMail
               –   Mailing APIs
             Java API for XML Parsing (JAXP)
               –   XML parsing and manipulation. Used to describe EJB components,
                   file scripts
             Java Transaction API (JTA) and Java Transaction Service (JTS)
               –   Used to manage transactions
             Java Authentication and Authorization Service (JAAS)
               –   Security services API
             Others (performance specific, not mandated by the specification)
               –   Load balancing, data caching, transparent failover, etc
Introduction to J2EE               (c)CDAC(Formerly NCST)                            18

         Basic Architecture

Introduction to J2EE   (c)CDAC(Formerly NCST)   19

         Application Deployment

Introduction to J2EE   (c)CDAC(Formerly NCST)   20

         Application Model

             Three fundamental parts
               –   Components
                          Captures the business process & data model
               –   Containers
                          Intercede between clients and components and provides services
                           like resource pooling, transaction support, etc
                          Defines component behaviours for clients
                          Hides low-level system functionalities
               –   Connectors
                          Provides plug-in support for application portability

Introduction to J2EE                   (c)CDAC(Formerly NCST)                           21

         J2EE Components

             The J2EE platform uses a multitiered distributed
              application model
             The J2EE application components parts comprise:
               –   Client-tier components (run on the client machine).
               –   Web-tier components (run on the J2EE server).
               –   Business-tier components (run on the J2EE server).
               –   Enterprise information system (EIS)-tier software (runs on the
                   EIS server).

              Essentially considered to be three-tiered application, because of being
             distributed over client, J2EE server and the database.
Introduction to J2EE             (c)CDAC(Formerly NCST)                                  22

         J2EE Components: Client Tier

             Client
               –   Web clients (web-browser, web pages, applets –)
               –   Application client (application user interface built using Swing
                   or AWT, or a command line interface)
               –   CORBA IIOP complaint clients

Introduction to J2EE             (c)CDAC(Formerly NCST)                               23

         J2EE Components: Web-tier

             Web components
               –   Servlets or JSP pages
               –   JavaBeans (optional)

Introduction to J2EE            (c)CDAC(Formerly NCST)   24

         J2EE Components: Business tier

             Business Components
               –   Enterprise Beans handle the application logic
                          Separates business process (session beans) and data
                           component (entity beans)
               –   Applications requiring messaging facility use JMS

Introduction to J2EE                  (c)CDAC(Formerly NCST)                     25

         J2EE Components: Data tier

             Application Database Server
               –   Any relational database (eg Oracle, MS SQL, etc)
             Enterprise Information System (EIS)
               –   Includes enterprise systems like ERP, mainframe transaction
                   processing, database systems and other legacy information
               –   J2EE applications often rely on this tier to store the
                   enterprise’s business critical data

Introduction to J2EE            (c)CDAC(Formerly NCST)                           26

         Container Services

             Security
             Transaction Management
             Naming and directory
             Remote connectivity
             Lifecycle management
             Persistance
             Concurrency

Introduction to J2EE      (c)CDAC(Formerly NCST)   27

         Container Types

             The deployment process installs J2EE application
              components in the J2EE containers
               –   EJB container
               –   Web container
               –   Application client container / Applet container
             The J2EE server provides EJB and Web containers
              and is the operating run-time environment

Introduction to J2EE             (c)CDAC(Formerly NCST)              28

         J2EE Server and Containers

                                  J2EE Server

           Web Browser           Servlet       JSP Page

                                    Web Container
              Client                                       Database

            Application         Enterprise    Enterprise
              Client              Bean          Bean
                                    EJB Container

Introduction to J2EE      (c)CDAC(Formerly NCST)                      29

         J2EE Roles

             J2EE product provider
               –   One who designs and makes available the J2EE platform,
                   APIs and other features defined in the J2EE specification
             Component Provider
               –   One who provides web components, enterprise beans, applets
                   or application clients for use in J2EE applications.
             Application Assembler
               –   One who gets the components and assembles it into an

Introduction to J2EE             (c)CDAC(Formerly NCST)                        30

         J2EE Roles

             Application Deployer and Administrator
               –   One who configures and deploys the J2EE application,
                   administers and monitors the deployment
             Tool provider
               –   One who creates development, assembly and packaging tools
                   used by component providers, assemblers and deployers

Introduction to J2EE            (c)CDAC(Formerly NCST)                     31

         J2EE Lifecycle

Introduction to J2EE   (c)CDAC(Formerly NCST)   32


             J2EE Tutorial, Sun Microsystems
             Simplified guide to the Java 2 Platform, Enterprise
              Edition, Sun Microsystems
             Sun TechDays Conference 2000-2001 slides,
               –   Sun Microsystems
             Mastering Enterprise JavaBeans, 1st & 2nd Edition
               –   By Ed Roman

Introduction to J2EE             (c)CDAC(Formerly NCST)             33

To top