• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
WebLogic Developer Webcast 1: JPA 2.0

WebLogic Developer Webcast 1: JPA 2.0






Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • This is our standard disclaimer--we will touch on some visionary things in this talk that should not be used for contractual purposes.

WebLogic Developer Webcast 1: JPA 2.0 WebLogic Developer Webcast 1: JPA 2.0 Presentation Transcript

  • Series Overview
    Data Access with JPA
    Distributed Caching with Coherence
    Message Driven and Web Services with Spring
    RESTful Web Services with JAX-RS and Javascript UI with JQuery
    Troubleshooting and tuning
    ©2010 Oracle Corporation
  • Next Session: Distributed Caching with Coherence
    Learn how to:
    Integrate Coherence with JPA
    Manage Coherence Servers and Clusters from WebLogic Admin Console
    ©2010 Oracle Corporation
  • The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions.
    The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • WebLogic Java Developer Webcast1. Data Access with JPA
    Shaun SmithProduct Manager—Oracle TopLinkSohailDadaniSr. Sales Consultant
  • Java Persistence API (JPA)—in a Nutshell
    How Java objects are stored in relational
    A programmer API for reading, writing, and querying persistent Java objects (“Entities”)
    A full featured query language in JP QL
    a container contract that supports plugging any JPA runtime in to any compliant container
    Java SE/EE
    Java Classes
    JPA Provider
    JDBC Driver
    Database Schema
  • JPA—Background
    A standardization of industry practices for Java POJO Object Relational Persistence
    Developed as part of the EJB 3.0 specification but now spun off into its own specification (JSR 317)
    Suitable for use in different modes
    Standalone in Java SE environment
    Hosted within a Java EE Container
    Merging of expertise from persistence vendors and communities including: TopLink, Hibernate, JDO, EJB vendors and individuals
  • Oracle TopLink 11gR1
    Oracle’s Enterprise Java Persistence Framework
    Includes open source EclipseLink with Commercial Support
    Certified on and part of the Oracle WebLogic application server
    Includes TopLink Grid: JPA integration with Coherence
    Supports scaling JPA applications into very large clusters
    Development tool support in Eclipse OEPE, JDeveloper, and NetBeans
  • Customer
    id: int
    name: String
    creditRating: int
    Object-Relational Mapping
    The activity of ‘Mapping’ is the process of connecting objects/attributes to tables/columns
  • Mapping with Annotations
    @Entitypublic class Customer {
    private Stringname;
    private Account account;
    public String getName() { return name; }
    public voidsetName(String name) {
    this.name = name;
    public Account getAccount() { return account; }
    public void setAccount(Account account) {
    this.account = account;
  • Mappings with XML
    <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"


  • Typical Development Approaches
    Bottom Up
    Start from a database schema and generate JPA entities
    A good way to bootstrap a project if you’re building on an existing database
    Top Down
    Generate database schema from JPA entities
    A good way to get started in a green field development—focus on developing a good Java domain model
    Meet in the Middle
    Map Java classes to an existing database schema
    Maps optimized Java domain model to an optimized database schema—typically follows Bottom Up and Top Down
  • Our Development Scenario
    Building a simple JAX-RS fronted Java application that interacts with a relational database
    Starting from an XSD that describes the documents the system must support
    Technologies we’ll use: JPA, JAXB, and JAX-RS
    Development Approach:
    Use JAXB Schema compiler to generate JAXB annotated POJOS
    Follow JPA “Top Down” approach by defining JPA mappings for generated classes and then generating a database schema from those mapped classes.
  • JPA in Java EE
  • JPA in EJB
  • OracleWebLogic YouTube Channelwww.YouTube.com/OracleWebLogic
    ©2010 Oracle Corporation