SlideShare une entreprise Scribd logo
1  sur  15
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  1
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  2
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. 3
WebLogic Java Developer Webcast1. Data Access with JPA Shaun SmithProduct Manager—Oracle TopLinkSohailDadaniSr. Sales Consultant
Java Persistence API (JPA)—in a Nutshell Defines: 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 Application Java Classes JPA Provider JDBC Driver PersistenceDescriptors 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 CUST Object-Relational Mapping The activity of ‘Mapping’ is the process of connecting objects/attributes to tables/columns ID NAME C_RATING
Mapping with Annotations @Entitypublic class Customer {  @Id private Stringname; @OneToOne 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" … <entityclass=“Customer">     <attributes> <idname=“name“/> <one-to-onename=“account“/>     </attributes> </entity> … </entity-mappings>
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  15

Contenu connexe

Tendances

Introduction to RESTful Webservices in JAVA
Introduction to RESTful Webservices  in JAVA Introduction to RESTful Webservices  in JAVA
Introduction to RESTful Webservices in JAVA psrpatnaik
 
Developing RESTful WebServices using Jersey
Developing RESTful WebServices using JerseyDeveloping RESTful WebServices using Jersey
Developing RESTful WebServices using Jerseyb_kathir
 
Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)PawanMM
 
Cwinters Intro To Rest And JerREST and Jersey Introductionsey
Cwinters Intro To Rest And JerREST and Jersey IntroductionseyCwinters Intro To Rest And JerREST and Jersey Introductionsey
Cwinters Intro To Rest And JerREST and Jersey Introductionseyelliando dias
 
RESTful Architecture
RESTful ArchitectureRESTful Architecture
RESTful ArchitectureKabir Baidya
 
Restful webservice
Restful webserviceRestful webservice
Restful webserviceDong Ngoc
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design PatternsPawanMM
 
JAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with JavaJAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with JavaJerry Kurian
 
Session 26 - Servlets Part 2
Session 26 - Servlets Part 2Session 26 - Servlets Part 2
Session 26 - Servlets Part 2PawanMM
 
REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web ServiceHoan Vu Tran
 
Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1PawanMM
 
Session 36 - JSP - Part 1
Session 36 - JSP - Part 1Session 36 - JSP - Part 1
Session 36 - JSP - Part 1PawanMM
 
Java Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet AdvancedJava Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet AdvancedIMC Institute
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API RecommendationsJeelani Shaik
 
RESTful services
RESTful servicesRESTful services
RESTful servicesgouthamrv
 
How to build a rest api.pptx
How to build a rest api.pptxHow to build a rest api.pptx
How to build a rest api.pptxHarry Potter
 
Session 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesSession 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesPawanMM
 
Session 40 - Hibernate - Part 2
Session 40 - Hibernate - Part 2Session 40 - Hibernate - Part 2
Session 40 - Hibernate - Part 2PawanMM
 

Tendances (20)

Introduction to RESTful Webservices in JAVA
Introduction to RESTful Webservices  in JAVA Introduction to RESTful Webservices  in JAVA
Introduction to RESTful Webservices in JAVA
 
Developing RESTful WebServices using Jersey
Developing RESTful WebServices using JerseyDeveloping RESTful WebServices using Jersey
Developing RESTful WebServices using Jersey
 
Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)
 
Cwinters Intro To Rest And JerREST and Jersey Introductionsey
Cwinters Intro To Rest And JerREST and Jersey IntroductionseyCwinters Intro To Rest And JerREST and Jersey Introductionsey
Cwinters Intro To Rest And JerREST and Jersey Introductionsey
 
RESTful Architecture
RESTful ArchitectureRESTful Architecture
RESTful Architecture
 
Restful webservice
Restful webserviceRestful webservice
Restful webservice
 
Doing REST Right
Doing REST RightDoing REST Right
Doing REST Right
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design Patterns
 
JAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with JavaJAX-RS. Developing RESTful APIs with Java
JAX-RS. Developing RESTful APIs with Java
 
Session 26 - Servlets Part 2
Session 26 - Servlets Part 2Session 26 - Servlets Part 2
Session 26 - Servlets Part 2
 
REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web Service
 
Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1
 
Rest web services
Rest web servicesRest web services
Rest web services
 
Session 36 - JSP - Part 1
Session 36 - JSP - Part 1Session 36 - JSP - Part 1
Session 36 - JSP - Part 1
 
Java Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet AdvancedJava Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet Advanced
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API Recommendations
 
RESTful services
RESTful servicesRESTful services
RESTful services
 
How to build a rest api.pptx
How to build a rest api.pptxHow to build a rest api.pptx
How to build a rest api.pptx
 
Session 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesSession 33 - Session Management using other Techniques
Session 33 - Session Management using other Techniques
 
Session 40 - Hibernate - Part 2
Session 40 - Hibernate - Part 2Session 40 - Hibernate - Part 2
Session 40 - Hibernate - Part 2
 

Similaire à WebLogic Developer Webcast 1: JPA 2.0

Similaire à WebLogic Developer Webcast 1: JPA 2.0 (20)

Venkatarao_2+Years_Experiance_JAVA2
Venkatarao_2+Years_Experiance_JAVA2Venkatarao_2+Years_Experiance_JAVA2
Venkatarao_2+Years_Experiance_JAVA2
 
Shweta_Saini_Resume
Shweta_Saini_ResumeShweta_Saini_Resume
Shweta_Saini_Resume
 
Wei ding(resume)
Wei ding(resume)Wei ding(resume)
Wei ding(resume)
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
Vaibhav_Jain
Vaibhav_JainVaibhav_Jain
Vaibhav_Jain
 
Sid K
Sid KSid K
Sid K
 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web Application
 
Resume
ResumeResume
Resume
 
J2 EEE SIDES
J2 EEE  SIDESJ2 EEE  SIDES
J2 EEE SIDES
 
MarvelSoft SchoolAdmin Dev Framework
MarvelSoft SchoolAdmin Dev FrameworkMarvelSoft SchoolAdmin Dev Framework
MarvelSoft SchoolAdmin Dev Framework
 
kowsalyamanickam_resume_OIM
kowsalyamanickam_resume_OIMkowsalyamanickam_resume_OIM
kowsalyamanickam_resume_OIM
 
Sreekanth java developer raj
Sreekanth java developer rajSreekanth java developer raj
Sreekanth java developer raj
 
Ziad Resume_New
Ziad Resume_NewZiad Resume_New
Ziad Resume_New
 
Javatraining
JavatrainingJavatraining
Javatraining
 
Rajesh Ramasamy
Rajesh RamasamyRajesh Ramasamy
Rajesh Ramasamy
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3
 
Noonan_resume
Noonan_resumeNoonan_resume
Noonan_resume
 
Bhargav
BhargavBhargav
Bhargav
 
Abdulla Resume
Abdulla ResumeAbdulla Resume
Abdulla Resume
 

Dernier

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Dernier (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

WebLogic Developer Webcast 1: JPA 2.0

  • 1. 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 1
  • 2. 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 2
  • 3. 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. 3
  • 4. WebLogic Java Developer Webcast1. Data Access with JPA Shaun SmithProduct Manager—Oracle TopLinkSohailDadaniSr. Sales Consultant
  • 5. Java Persistence API (JPA)—in a Nutshell Defines: 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 Application Java Classes JPA Provider JDBC Driver PersistenceDescriptors Database Schema
  • 6. 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
  • 7. 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
  • 8. Customer id: int name: String creditRating: int CUST Object-Relational Mapping The activity of ‘Mapping’ is the process of connecting objects/attributes to tables/columns ID NAME C_RATING
  • 9. Mapping with Annotations @Entitypublic class Customer { @Id private Stringname; @OneToOne 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; } }
  • 10. Mappings with XML <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" … <entityclass=“Customer"> <attributes> <idname=“name“/> <one-to-onename=“account“/> </attributes> </entity> … </entity-mappings>
  • 11. 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
  • 12. 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.

Notes de l'éditeur

  1. This is our standard disclaimer--we will touch on some visionary things in this talk that should not be used for contractual purposes.