27
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta

2.J2EE Overview

Embed Size (px)

DESCRIPTION

j2ee

Citation preview

  • Sapana Mehta (CS-6V81)Overview Of J2EE & JBossSapana Mehta

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Past HistoryInitially two tier architecture (client server applications) Client is responsible for data access applying business logic and presentation of dataOnly service provided by Server was that of database server.

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Two Tier Application Architecture Client Server

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Two Tier Application ArchitectureDrawbacksEasy to deploy but difficult to enchance or upgrade.It makes reuse of business and presentation logic difficultNot scalable and not suited for internet

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Java 2 Platform Enterprise Edition(J2EE)J2EE is an architecture for implementing enterprise class applications using Java and Internet Technology- Solves problems of two tier architecture

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)J2EETo develop n tier applicationIt supports the development of a variety of application types small client server systemsSystems running on IntranetsSystems on large scale internet e-commerce site

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)J2EE Features

    Component based modelContainer provided servicesHighly ScaleableSimplified ArchitectureFlexible security model

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Java: Foundation for J2EEJ2EE is an application of javaWrite once and deploy the code into any platform

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)J2EE Components & ServicesPrimary technologiesServletsJavaServer Pages (JSP)Enterprise JavaBeans (EJB)Standard services & supporting technologiesJava database connectivity(JDBC) data access APIRemote Method Invocations (RMI)Extensible Markup Languages(XML)JavaIDLJavaMail

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)J2EE TiersClient PresentationHTML or Java applets deployed in BrowserXML documentations transmitted through HTTPJava clients running in Client Java Virtual Machine (JVM)Presentation LogicServlets or JavaServer Pages running in web serverApplication LogicEnterprise JavaBeans running in Server

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)J2EE Application ModelBrowser is able to process HTML and applets pages.It forwards requests to the web server, which has JSPs and ServletsServlets and JSPs may access EJB server.Java Standalone runs on java client, which access EJB server using RMI.

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)J2EE Application Model

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Enterprise Java Beans (EJBs)Enterprise Java beans architecture is a component model for development and deployment of distributed business application.Entity BeansRepresent persistent business EntityPersisted in storage system ( usually Database)Might contain Application logic intrinsic to entitySession BeansPerform work for individual clients on the serverEncapsulate complex business logicCan coordinate transactional work on multiple entity beans

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)States and PersistenceSession beans can beStateless- belong to client for duration of a method callStateful- belong to client for duration of client conversationEntity beans can haveBean-managed persistence- The developer writes SQL code to retrieve,store and update databaseContainer managed persistence- The developer provide database mapping information that allows the container to manage persistence

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Example of EJB ApplicationIt consists of number of clients accessing session beans and entity beansEach Session bean provides specialized processing on behalf of cliente.g. Travel Agent session bean makes travel reservations while Flight Scheduler bean schedules planes to fly on various routes.Each Entity Bean represent different type of business entity. e.g.Passengers, seats, planes, flights are entity beans

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Example EJB Application

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Overview of ServletsAre container managed web componentsReplace Common Gateway Interface(CGI) or Active Server Pages (ASP)Generate dynamic response to requests from web based clientsSynchronize multiple concurrent client requestServe as client proxies

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Servlet OperationServer is Java program that runs as separate thread inside servlet container.Servlet container is part of web serverIt interact with web client using response request paradigm

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)JavaServer Pages (JSP)Text based documents describe how to process a request and create a responseContains HTML or XML and other JSP elements defined by JSP specification. Are Installed on web server are web components that sits on top of java servlet mode.

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)JSP AdvantagesPerformanceRuntime characteristics of servletsAutomatic recompilation of modified pagesServer side processingProgrammingEmphasize use of reusable componentsWrite Once , Run Anywhere propertiesExtensible through custom tag librariesProvides front end access mechanism to EJBs

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Parts of JSP PagesDirective

    Declaration

    Raw HTMLShopping CartAction

    Scriplets%Cpi = cart.getCartItems ( );it = cpi.iterator();While (it.hasNext()){ci= (Cart Item)it.next();%>

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)Parts of JSP PagesExpression
  • Sapana Mehta (CS-6V81)JBoss- J2EE ProductFIND OUT MORE ABOUTTODAYS MOST SUCCESSFUL OPENSOURCE- DEVELOPED APPLICATIONSERVER

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)What is JBossCreated in 1999, JBoss is the product of an OpenSource developer community dedicated to developing the best J2EE-compliant application server in the marketWith 1000 developers worldwide and a steadily growing number of downloads per month, reaching 72,000 for October 01 (per independent www.sourceforge.net), JBoss is arguably the most downloaded application server in the world todayDistributed under an LGPL license, JBoss is absolutely FREE for use. No cost. Period.

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)What is Application ServerApplication servers enable the development of multi-tiered distributed applications. They are also called middleware

    An application server acts as the interface between the database(s), the web servers and the client browsers

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)JBoss- Application Server

    Sapana Mehta (CS-6V81)

  • Sapana Mehta (CS-6V81)ConclusionFirst they ignore youThen they laugh at youThen they fight youThen you win

    -- Mahatma Gandhi

    Sapana Mehta (CS-6V81)