JDev Fusion Middleware

Embed Size (px)

Citation preview

  • 8/10/2019 JDev Fusion Middleware

    1/40

  • 8/10/2019 JDev Fusion Middleware

    2/40

    Successful J2EE

    Deployment

    George Trujillo

    Trubix / IOUG

    Tugdual Grall

    Oracle

  • 8/10/2019 JDev Fusion Middleware

    3/40

    Oracle Fusion MiddlewareIntegrated, Standards-Driven Technology

    Platform

    Infrastructure for Fusion Architecture

    Standard J2EE Java Environment

    Application Development Framework and Tools

    Business Process Design and Management

    Enterprise Portal and Collaborative Workplace

    Identity Management and Security

    Enterprise Systems and Service Management

    Mobile/Wireless

    GRID infrastructure

  • 8/10/2019 JDev Fusion Middleware

    4/40

    Agenda

    J2EE Overview

    Application Life Cycle

    Design

    Development / Testing

    Deployment

    Administer

  • 8/10/2019 JDev Fusion Middleware

    5/40

    Application Layers Mapped to

    J2EE Tiers and Technology

    J2EE helps developers build layered

    applications, each providing different services

    Servlets

    HTML, JSP

    Java Objects, Session Beans

    Java Objects, Entity Beans

    Control

    Presentation

    Business Logic

    Persistent Objects

    Web Tier

    Web Tier

    Business Tier

    Business Tier

    Application Layer J2EE Tier J2EE Technology

  • 8/10/2019 JDev Fusion Middleware

    6/40

    Web Application / JDBC

    Pros

    Simple to build

    Simple to package and deploy

    Low overhead from container

    Relatively easy to test

    Cons

    Needs discipline to keep UI

    and logic separate

    No container transactionsupport

    Must code all database calls

    JSP + Servlet

    UI

    Business Logic

    JDBC

    DB

    Web Container

  • 8/10/2019 JDev Fusion Middleware

    7/40

    Web Application / Local EJB

    Pros Separation of business logic

    Entity beans for persistence

    No serialization or networkcalls

    Concurrency managed

    Can convert to remoteinterface and Web serviceendpoint if required

    Cons Uses EJB infrastructure

    Harder to test business logicbehind local interfaces

    JSP + Servlet

    UI

    Session Bean - Logic

    Entity Bean - Persistence

    DB

    Web + EJB Container

    local

  • 8/10/2019 JDev Fusion Middleware

    8/40

    Web Application / Remote EJB

    Pros Most flexible architecture

    Can separate EJB containerto different server

    Multi client enabled Can be exposed as Web

    service endpoint

    Cons Slower performance, remote

    network calls and serialization Can be difficult to configure

    and debug

    Session Bean - Logic

    Entity Bean - Persistence

    DB

    Web Container

    remote

    JSP + Servlet

    UI

    EJB Container

    Web Container

  • 8/10/2019 JDev Fusion Middleware

    9/40

    Quotes

    It works well and my machine !!!

    Why it is slower on a my cluster???

    I can not deploy your application! Why my build is broken again?

  • 8/10/2019 JDev Fusion Middleware

    10/40

    J2EE Application Lifecycle

    DesignAdminister

    Develop

    Test

    Deploy

  • 8/10/2019 JDev Fusion Middleware

    11/40

    J2EE Application Lifecycle

    DesignAdminister

    Develop

    Test

    Deploy

  • 8/10/2019 JDev Fusion Middleware

    12/40

    Design

    Design Phase Goals

    Business Requirement

    Performance and Scalability Requirements

    Security

    Tools/Methodologies

    UML Hurdon

    Good Design == Good Deployment

  • 8/10/2019 JDev Fusion Middleware

    13/40

    Design: J2EE / Web Services

    Understand the different J2EE Components Web Container

    EJB Container

    Infrastructure Services

    JCA, JTA, JMS, Web Services

    Understand Oracle Application Server components

    Look at Open Source project too

    Use Proven Design Patterns Involve System and Database administrators

    Do not reinvent the wheel !

  • 8/10/2019 JDev Fusion Middleware

    14/40

    J2EE Application Lifecycle

    DesignAdminister

    Develop

    Test

    Deploy

  • 8/10/2019 JDev Fusion Middleware

    15/40

    Development

    Define standards for your team

    Coding standard

    Tooling

    Process

    Use a source control

    JDeveloper integrated with CVS and Subversion

    Automated testing and Build processes Ant, JUnit

  • 8/10/2019 JDev Fusion Middleware

    16/40

    Develop: Presentation Layer

    Model View Controller approach

    Standard Based when possible

    JavaServer Faces

    Apache Struts (de-facto standard)

  • 8/10/2019 JDev Fusion Middleware

    17/40

    Develop: Business Layer

    Should be a reusable Service

    Use J2EE / Standard components

    Session Bean (EJB)

    Web Service

    Limit Remote Calls

    Local invocation of EJB should be the default

  • 8/10/2019 JDev Fusion Middleware

    18/40

    Develop: Persistence Layer

    Data sources are heterogonous RDBMS, XML, Web Services, 3rdPartyApplications

    Use J2EE Services to access these data

    Connection Pooling

    Transaction Management

    J2EE Connector Architecture (JCA/J2CA)

    Java API for XML (JAX-*) JAX-RPC, JAX-P, JAX-B, .

  • 8/10/2019 JDev Fusion Middleware

    19/40

    Develop: O/R Requirements

    Adhere to rules of database

    Build the J2EE application butdo NOT expect to changeschema

    Build the J2EE application but

    the schema might change Be able to profile all SQL calls

    to database

    Let DBA influence/changedatabase calls/SQL generatedto optimize

    Leverage database featureswhere appropriate (outer joins,sub queries, specializeddatabase functions)

    Want to work with objects/beans

    Data model should not constrain

    object model

    Dont want database code in

    object/component code Accessing data should be fast

    Minimize calls to database

    they are expensive

    Object-based queriesnot SQL

    Isolate J2EE app from schemachanges

    Notification of changes to data

    occurring at database

    DB Dev & DBA J2EE Developer

  • 8/10/2019 JDev Fusion Middleware

    20/40

  • 8/10/2019 JDev Fusion Middleware

    21/40

    Test: Prepare Your Success

    Test the application frequently and iteratively

    Unit test components

    Test your application at every milestone

    Functionnality Performance

    Debug

    Testing Solution

    Automated Testing

    Integrated to your IDE, and you Build process

    Junit, testNG, custom code

    Do not make your users the testers !

  • 8/10/2019 JDev Fusion Middleware

    22/40

    Develop: Tools

    Use and IDE such as JDeveloper

    Modeling (UML, Database)

    Help to develop J2EE and Web Services components

    Debugger, Profiler (remotely and locally)

    Integrated with source control software

    Junit, Ant, Maven integration for easy testing and build

    Java, XML, HTML, PL/SQL editors

    Easy Deployment

  • 8/10/2019 JDev Fusion Middleware

    23/40

    Standards and Guidelines

    It is important to develop consistent

    standards, guidelines, documentation,

    deployment and packaging methods.

    Look at sources such as Java Blueprints and

    the Oracle Technology Network for guidelines.

    Understand how to leverage design patterns

    and frameworks within your applications.

  • 8/10/2019 JDev Fusion Middleware

    24/40

    D E M O N S T R A T I O N

    End to End Development with

    Oracle JDeveloper

  • 8/10/2019 JDev Fusion Middleware

    25/40

    J2EE Application Lifecycle

    DesignAdminister

    Develop

    Test

    Deploy

  • 8/10/2019 JDev Fusion Middleware

    26/40

    Packaging

    Development teams need to understand how their softwarecomponents need to be packaged for the types of applicationsthey are building.

    The choice of packaging will have an impact on how anapplication will work and act in a distributed environment.

    Packaging needs to consider: The type of archive files to use.

    The types of deployment descriptors for particular platforms.

    Deployment profiles are created in a project when usingJDeveloper. Separate profiles are required for differentdeployment targets. Verify that JDeveloper can find all the

    necessary library files (i.e. Swing). Be aware that different Java files (Applets, JSPs, Servlets, EJBs,

    etc.) all reside in different locations.

    Precompile your JavaServer Pages for better performance

  • 8/10/2019 JDev Fusion Middleware

    27/40

    Deployment Options

    Make sure to clearly understand the deployment

    options available in each deployment, test and

    production environment

    Use deployment Plan (new standard for J2EE 1.4)

    If the build process is complex, tools like Ant and

    JSR-88 may provide the flexibility and the cross

    platform capability necessary.

    JDeveloper and the Oracle Application Server providea lot of flexibility for deployment environments.

  • 8/10/2019 JDev Fusion Middleware

    28/40

    JSR-88: J2EE Deployment API

    J2EE applications can be made portable acrossvendor implementations

    No standard existed for deployment of the portableapplication

    JSR-88 fills the void Standard API and operations for deployment of applications

    to J2EE containers

    Vendor specific configuration abstracted from actualdeployment process

    Expected to be an API consumed largely by toolsvendors

  • 8/10/2019 JDev Fusion Middleware

    29/40

    JSR-88 Capabilities

    Deployment of all J2EE component types

    Configuration of an application for deployment

    Asynchronous deployment

    Canceling of deployment and undeployment

    operations

    Progress notifications

    Connected and disconnected usage

    Optional support for re-deployment operations

  • 8/10/2019 JDev Fusion Middleware

    30/40

    Performing a Deployment

    Deployment Tool

    J2EE

    Container

    Get vendor specific config

    External resources

    Display config elements

    to deployer for entering

    ARCHIVEDeployment Plan

    +

    Submits archive and

    deployment plan for

    deployment

    Deployment

    Progress &

    Status

    1

    2

    3 Generates deployment plan

    4

    5

  • 8/10/2019 JDev Fusion Middleware

    31/40

  • 8/10/2019 JDev Fusion Middleware

    32/40

  • 8/10/2019 JDev Fusion Middleware

    33/40

    J2EE Application Lifecycle

    DesignAdminister

    Develop

    Test

    Deploy

  • 8/10/2019 JDev Fusion Middleware

    34/40

    Application Server Management

    Component Management

    Deploying and Maintaining J2EE Applications

    J2EE Application Diagnostics

    Clustering

    Backup and Recovery

    Port Management Accessing Diagnostic Logs

  • 8/10/2019 JDev Fusion Middleware

    35/40

    Page Performance Analysis

    JSP EJB JDBC/SQL

    Full URL processing call stack analysis

    Tracing down to the SQL statement level

    Tuning Recommendations

    internet

    Servlet

    Processing time and Load

    Slowest URLs and # of Hits

    Top Servlets & JSPs by Requests & Processing Time

    Application Performance Correlation

  • 8/10/2019 JDev Fusion Middleware

    36/40

    J2EE Monitoring

    Pre-defined thresholds

    Alert notifications and response actions

    Blackout periods

    Performance baselines

    Graphical performance charts

    Historical data repository

    Performance trends and comparisons

  • 8/10/2019 JDev Fusion Middleware

    37/40

    Application Server Historical Data

    Trends and Comparisons

    Whats the current CPU usage for server #1?

    How did it do over the past 24 hours?

    How does that compare to server #2 over the same

    timeframe?

  • 8/10/2019 JDev Fusion Middleware

    38/40

    Topology View

  • 8/10/2019 JDev Fusion Middleware

    39/40

  • 8/10/2019 JDev Fusion Middleware

    40/40