JBoss at Work JAW Motors Application Chapter 2 - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

JBoss at Work JAW Motors Application Chapter 2

Description:

Viewing cars JSP. Storing cars (persistence) JDBC or Hibernate ... Sharing data between dealerships Web Services. JBoss Application server ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 11
Provided by: triton8
Category:

less

Transcript and Presenter's Notes

Title: JBoss at Work JAW Motors Application Chapter 2


1
JBoss at WorkJAW Motors ApplicationChapter 2
  • Jeff Schmitt
  • October 9, 2006

2
JAW Motors Application
  • Fictitious automobile dealership
  • Each chapter progressively adds a new J2EE
    technology that solves a specific business
    problem
  • Viewing cars JSP
  • Storing cars (persistence) JDBC or Hibernate
  • Credit check -- JMS message and JavaMail response
  • Purchasing transactional support using
    Stateless Session Beans
  • Sharing data between dealerships Web Services

3
JBoss Application server
  • Compiled Java code runs inside JVM
  • Java classes need a container to provide an
    infrastructure, a framework to handle low-level
    details
  • An application server is a loosely coupled
    collection of containers (or "services") that
    correspond to the various parts of the J2EE API.
  • JBoss is an open-source J2EE 1.4 standards
    compliant application server

4
Java Management ExtensionsJMX
  • JBoss is a thin JMX (Java Management Extensions)
    microkernel
  • JMX is a framework that allows you to interact
    with live, running code
  • Start and stop services
  • Gather metrics
  • Change parameters
  • Services that implement the JMX interface are
    called Managed beans or Mbeans
  • MBeans that run inside JBoss include Log4J,
    Tomcat, Hibernate

5
Tools needed
  • Java JDK J2SE 1.4 or higher
  • Ant to compile, package and deploy Java code
  • XDoclet to generate deployment descriptors,
    web.xml and various other J2EE configuration
    files.
  • XDoclet is a combination of custom Ant tasks and
    special attributes that you include in your
    source code.

6
JAW Motors Application
  • Use Tomcat servlet container
  • JBoss is an application server, but includes
    Tomcat
  • 3-tier application
  • Presentation JSP and servlets
  • Business logic EJB and MDBs
  • Persistence relational database
  • Components in each tier
  • Highly cohesive components do only one thing
  • Loosely coupled components have no dependences
    across tiers

7
Model View Controller
  • View HTML, JSP, CSS and JSTL produce the screen
    contents
  • Model POJO (Plain Old Java Objects), Java Beans
  • Controller mediates communication between the
    view and the model -- a servlet
  • Framework many design decisions already made
    for you this book is framework-neutral uses
    its own controller servlet

8
View
  • carList.html
  • carList-jstl.jsp with JSTL tags JSP scriplet
    defines data carList
  • carList.jsp with stylesheet default.css data
    saved in pageContext

9
Model and Controller
  • Model
  • CarBean is a POJO, is a JavaBean
  • carList.jsp uses JSP EL
  • Controller
  • ControllerServlet
  • Action parameter indicates page indirectly
  • To access carList.jsp we use lta
    hrefcontroller?actionviewCarListgt
  • Controller translates actionviewCarList to
    access carList.jsp

10
JBoss Deployment
  • Applicatioin Assembly
  • Web Archive file a collection of presentation
    tier files (HTML, JSP, Servlets, etc)
  • EAR Enterprise Archive (EJBs)
  • SAR Service Archive (Web Services)
  • Use jar command to bundle them into a single
    file
  • Application Deployment
  • Hot deployment -- While JBoss is running, copy
    the WAR, EAR or SAR file to JBOSS_HOME/server/de
    fault/deploy/
  • Cold deployment stop JBoss, copy the file,
    restart JBoss this is the recommended deployment
Write a Comment
User Comments (0)
About PowerShow.com