JPA Persistence Guide (V6.0) Table of Contents

Total Page:16

File Type:pdf, Size:1020Kb

JPA Persistence Guide (V6.0) Table of Contents JPA Persistence Guide (v6.0) Table of Contents EntityManagerFactory. 2 Create an EMF in JavaSE . 2 Create an EMF in JavaEE . 2 Persistence Unit . 3 EntityManagerFactory Properties . 6 Closing EntityManagerFactory . 27 Level 2 Cache. 27 Datastore Schema. 34 Schema Generation for persistence-unit . 34 Schema Auto-Generation at runtime . 35 Schema Generation : Validation . 36 Schema Generation : Naming Issues . 36 Schema Generation : Column Ordering . 37 Schema : Read-Only. 37 SchemaTool . 38 Schema Adaption . 44 RDBMS : Datastore Schema SPI . 44 EntityManager. 48 Opening/Closing an EntityManager. 48 Persisting an Object. 49 Persisting multiple Objects in one call . 49 Finding an object by its identity . 50 Finding an object by its class and unique key field value(s) . 50 Deleting an Object . 51 Deleting multiple Objects. 51 Modifying a persisted Object. 52 Modifying multiple persisted Objects . 52 Refreshing a persisted Object . 52 Getting EntityManager for an object. 53 Cascading Operations . 53 Orphans . 54 Managing Relationships . 54 Level 1 Cache. 56 Object Lifecycle. 58 Transaction PersistenceContext . 58 Extended PersistenceContext . 58 Detachment . 58 Helper Methods . 59 Transactions . 60 Locally-Managed Transactions. 60 JTA Transactions. 61 Container-Managed Transactions . 63 Spring-Managed Transactions . 63 No Transactions . 63 Transaction Isolation . 64 Read-Only Transactions . 64 Flushing . 65 Transactions with lots of data. 66 Transaction Savepoints . 67 Locking . 68 Optimistic Locking. 68 Pessimistic (Datastore) Locking . 69 Datastore.
Recommended publications
  • Architecture Committee Handbook
    Architecture Committee Handbook openKONSEQUENZ created by Architecture Committee We acknowledge that this document uses material from the arc 42 architecture template, http://www.arc42.de. Created by Dr. Peter Hruschka & Dr. Gernot Starke. ​ Template Revision: 6.1 EN June 2012 1 Revision History Version Date Reviser Description Status 1.0 2016-07-04 A. Göring Alignment in AC/QC conference call Released 1.0.1 2016-07-19 A. Göring Added UML-Tool decision in chapter 2. Draft for Constraints, Added software-tiers v1.1 image in chapter 8. 1.1 2016-08-18 A.Göring Alignment in AC/QC conference call Released 1.1.1 2016-08-26 F. Korb, M. Description of architecture layer model Draft for Rohr and its APIs. Example internal module v1.2 architecture (Presented in ACQC-Meeting 15.& 29.08.2016) 1.2 2016-09-14 A. Göring Integration of Concept for Plattform Released Module Developmennt, Consolidation v1.1.1 1.2.1 2016-09-16 S.Grüttner Reorganization of Chapter7 Draft for Deployment Environment, clearifying v1.3 the reference environment as “image”. Adding cutting of CIM Cache. Modified Logging (8.17) for use of SLF4J. Added potential non-functional requirement for Offline-Mode. 1.2.2 2017-01-30 A. Göring Adding Link to oK-API Swagger Draft for Definition, deleting old Interfaces v1.3 Annex. Adding CIM Cache Module dependencies image and text (from Felix Korb) 1.3 2017-02-14 A. Göring Alignment in/after AC/QC conference Released call 1.3.1 2017-09-05 A. Göring Minimum requirement change from Released Java EE 7 to Oracle Java SE 8.
    [Show full text]
  • On-Process Verification and Report
    CORE Metadata, citation and similar papers at core.ac.uk Provided by Open Repository of the University of Porto FACULDADE DE ENGENHARIA DA UNIVERSIDADE DO PORTO On-Process Verification and Report Tiago Nunes Project Report Master in Informatics and Computing Engineering Supervisor: João Pascoal Faria (PhD) 3rd March, 2009 On-Process Verification and Report Tiago Nunes Project Report Master in Informatics and Computing Engineering Approved in oral examination by the committee: Chair: Ana Cristina Ramada Paiva Pimenta (PhD) External Examiner: Fernando Brito e Abreu (PhD) Internal Examiner: João Carlos Pascoal de Faria (PhD) 19th March, 2009 Abstract This report describes the motivation, architecture and post-implementation return on in- vestment of an On-Process Validation and Report solution. Its objective was to create an automation tool that would free the Product Assurance team at Critical Software, S.A. from repetitive and time-consuming tasks, while at the same time providing a platform upon which further systems could be implemented, augmenting the tool kit of the Product Assurance Engineers. This was achieved by designing a modular and extensible platform using cutting-edge Java technologies, and following a goal-oriented development process that focused on iteratively providing as many domain-specific features as possible. It is shown that the resulting system has the potential for considerably reducing costs in the validation of projects throughout their entire life cycle. i ii Resumo Este relatório descreve a motivação, arquitectura e o retorno sobre o investimento após a implementação de uma solução para a Validação e Reporting On-Process. O seu objec- tivo era a criação de uma ferramenta de automação que libertaria a equipa de Controlo de Produto da Critical Software, S.A.
    [Show full text]
  • Eclipselink Understanding Eclipselink 2.4
    EclipseLink Understanding EclipseLink 2.4 June 2013 EclipseLink Concepts Guide Copyright © 2012, 2013, by The Eclipse Foundation under the Eclipse Public License (EPL) http://www.eclipse.org/org/documents/epl-v10.php The initial contribution of this content was based on work copyrighted by Oracle and was submitted with permission. Print date: July 9, 2013 Contents Preface ............................................................................................................................................................... xiii Audience..................................................................................................................................................... xiii Related Documents ................................................................................................................................... xiii Conventions ............................................................................................................................................... xiii 1 Overview of EclipseLink 1.1 Understanding EclipseLink....................................................................................................... 1-1 1.1.1 What Is the Object-Persistence Impedance Mismatch?.................................................. 1-3 1.1.2 The EclipseLink Solution.................................................................................................... 1-3 1.2 Key Features ...............................................................................................................................
    [Show full text]
  • Eclipselink and JPA
    <Insert Picture Here> High Performance Persistence with EclipseLink Shaun Smith—Principal Product Manager [email protected] What is EclipseLink? ●Comprehensive Open Source Persistence solution ● EclipseLink JPA Object-Relational (JPA 2.0 RI) ● EclipseLink MOXy Object-XML (JAXB) ● EclipseLink SDO Service Data Objects (SDO 2.1.1 RI) ● EclipseLink DBWS Generated JAX-WS from DB ●Mature and full featured ● Over 13 years of commercial usage ● Initiated by the contribution of Oracle TopLink ●Target Platforms ● Java EE, Web, Spring, Java SE, and OSGi ●Get involved ● Open collaborative community ● Contributions welcomed EclipseLink Project Java SE Java EE OSGi Spring Web JPA MOXy EIS SDO DBWS Eclipse Persistence Services Project (EclipseLink) Databases XML Data Legacy Systems EclipseLink: Distributions ●Eclipse.org ● www.eclipse.org/eclipselink/downloads ● http://download.eclipse.org/rt/eclipselink/updates ●Oracle ● TopLink 11g ● WebLogic Server 10.3 ●GlassFish v3 ● Replaces TopLink Essentials ● JPA 2.0 Reference Implementation ●Spring Source ● Spring Framework and Bundle Repository ●JOnAS ●Jetty ●JEUS TMaxSoft ●SAP NetWeaver coming soon EclipseLink Developer Tool Support . EclipseLink is a Runtime Project but supported by IDEs . Eclipse IDE . EclipseLink support included by Dali in Eclipse 3.4 (Ganymede) . EclipseLink included in Eclipse 3.5 (Galileo) – JavaEE ● Enhanced Dali support for use of EclipseLink . Oracle Enterprise Pack for Eclipse (OEPE) . MyEclipse . JDeveloper 11g . JPA, Native ORM, OXM, and EIS mapping . NetBeans . Standalone
    [Show full text]
  • Das Ende Der Finsternis Markus Karg, Java User Group Pforzheim
    Das Ende der Finsternis Markus Karg, Java User Group Pforzheim Nachdem die Anwenderschaft, neudeutsch „Community“, monatelang lautstark an der offensichtlichen Untätigkeit von Oracle herumgemeckert hat, ging es plötzlich ganz schnell: Java EE wurde an die Eclipse Foundation übergeben. Doch was bedeutet das im Detail? Ist Java EE nun tot und die JCP aufgelöst? Ein bewusst provokativer Kommentar aus Anwendersicht. Plötzlich war es da: das lange geforderte Öffnen von Test Compatibility ge Java EE) dort weiterentwickelt werde. Aber werden sie das denn Kits (TCK), Reference Implementations (RI) und Specifications (Specs). wirklich? Fakt ist: Bislang tut sich rein gar nichts, sieht man vom all- Was auch immer der letztendliche Auslöser war, sei es die monatelan- gegenwärtigen Auf-den-Busch-Klopfen einmal ab. ge Nörgelei oder einfach nur der Wunsch, sich einer Altlast zu entledi- gen, der Community soll es recht sein: Java EE ist nun endlich und voll- Zumindest tut sich nicht mehr als vorher. So schnell wird sich das ständig Open Source. Oder doch nicht? Naja, es kommt darauf an, wen auch nicht ändern. Auf die Frage, wo Oracle EE4J in einem Jahr stün- man fragt! Oracle sieht das so, die Community nicht unbedingt. de, will sich Oracle kaum mehr abringen lassen als ein „Aller Code ist von der Rechtsabteilung geprüft, auf die Server der Eclipse Foun- Trau, schau wem … dation kopiert und besteht als das Java EE 8 TCK.“ Moment mal … Die Eclipse Foundation gibt sich zumindest schon mal demonstrativ Java 8? Wurde denn nicht behauptet, durch den Move zur Eclipse euphorisch: Mike Milinkovic, Executive Directory eben jenes Indus- Foundation gehe dank der breiten Community-Beteiligung nun alles trie-Clubs, gab jüngst in der Keynote seiner Hausmesse EclipseCon viel flotter? Schade.
    [Show full text]
  • Oracle Enterprise Pack for Eclipse, Which Is a Set of Plugins for Eclipse, to Support Java EE Development
    Oracle[1] Enterprise Pack for Eclipse User’s Guide 12c (12.2.1.3) E71327-01 June 2016 Documentation that describes how to use Oracle Enterprise Pack for Eclipse, which is a set of plugins for Eclipse, to support Java EE development. It allows you to create, configure and deploy Oracle Mobile Application Framework applications for iOS and Android. You can create, configure, and run Oracle ADF applications on Glassfish and Oracle WebLogic Server. Oracle Enterprise Pack for Eclipse User's Guide, 12c (12.2.1.3) E71327-01 Copyright © 2008, 2016 Oracle and/or its affiliates. All rights reserved. Primary Author: Catherine Pickersgill This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S.
    [Show full text]
  • Oracle Utilities Testing Accelerator Licensing Information User Manual Release 6.0.0.3.0 F35952-01
    Oracle Utilities Testing Accelerator Licensing Information User Manual Release 6.0.0.3.0 F35952-01 June 2021 Oracle Utilities Testing Accelerator Licensing Information User Manual, Release 6.0.0.3.0 Copyright © 2019, 2021 Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation"
    [Show full text]
  • RCP Applications
    Helios Wayne Beaton The Eclipse Foundation Copyright © 2010 Eclipse Foundation, Inc., Made available under the Eclipse Public License v 1.0 What is Eclipse? Copyright © 2010 Eclipse Foundation, Inc., Made available under the Eclipse Public License v 1.0 Eclipse is a Java IDE .Language-aware editors, views, ¼ .Refactoring support .Integrated unit testing and debugging .Incremental compilation and build .Team development support Copyright © 2010 Eclipse Foundation, Inc., Made available under the Eclipse Public License v 1.0 3 Eclipse is an IDE Framework .Eclipse + JDT = Java IDE . First class framework for Java, language aware editor, incremental build, integrated debugging, ... .Eclipse + CDT = C/C++ IDE . First class framework for C/C++, language aware editor, refactoring, search .Eclipse + PDT = PHP IDE .Eclipse + JDT + CDT + PDT = Java, C/C++, PHP IDE . Ruby, TCL, JavaScript, ... Copyright © 2010 Eclipse Foundation, Inc., Made available under the Eclipse Public License v 1.0 4 Eclipse is a Tools Framework .Plug-ins make Eclipse whatever you need it to be .Platform of frameworks and exemplary tools .Tools extend the platform using bundles/plug-ins . Business Intelligence and Reporting Tools, Web Tools, Data Tools, Eclipse Modeling Framework, ... Copyright © 2010 Eclipse Foundation, Inc., Made available under the Eclipse Public License v 1.0 5 Eclipse is a Application Framework .Remove the IDE elements; you're left with a general-purpose application framework . Linux, Windows, Mac OSX, UNIX, embedded . Rich widget set, graphics . Native-OS integration (drag and drop, OLE/XPCOM integration) .A platform for rich clients Copyright © 2010 Eclipse Foundation, Inc., Made available under the Eclipse Public License v 1.0 6 Eclipse is Runtimes! .Remove the UI elements and you©re left with a general-purpose component model .
    [Show full text]
  • Third-Party License Acknowledgments
    Symantec Privileged Access Manager Third-Party License Acknowledgments Version 3.3.5 Symantec Privileged Access Manager Third-Party License Acknowledgments Broadcom, the pulse logo, Connecting everything, and Symantec are among the trademarks of Broadcom. Copyright © 2019 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. For more information, please visit www.broadcom.com. Broadcom reserves the right to make changes without further notice to any products or data herein to improve reliability, function, or design. Information furnished by Broadcom is believed to be accurate and reliable. However, Broadcom does not assume any liability arising out of the application or use of this information, nor the application or use of any product or circuit described herein, neither does it convey any license under its patent rights nor the rights of others. 2 Symantec Privileged Access Manager Third-Party License Acknowledgments Contents Activation 1.1.1 ..................................................................................................................................... 7 Adal4j 1.1.2 ............................................................................................................................................ 7 AdoptOpenJDK 1.8.0_272-b10 ............................................................................................................ 7 Aespipe 2.4e aespipe ........................................................................................................................
    [Show full text]
  • Development System Set-Up
    Inhaltsverzeichnis Development System Set-Up.................................................................................................1 Required............................................................................................................................1 Optional..............................................................................................................................2 Next steps..........................................................................................................................3 Known problems....................................................................................................................3 Exceptions when starting Gnuaccounting from Eclipse....................................................3 Ant Exceptions ..................................................................................................................3 Conflicts with previous data/Re-”installing” gnuaccounting...............................................3 Videos for Gnuaccounting developers...................................................................................3 How the source code is organized.........................................................................................4 How to develop the GUI.....................................................................................................5 Superglobals, Important classes.......................................................................................5 Code Examples..................................................................................................................6
    [Show full text]
  • Using Maven with Oracle Toplink
    Using Maven with Oracle TopLink An Oracle White Paper July 2013 Using Maven with Oracle TopLink 12.1.2 Using Maven with Oracle TopLink Introduction ....................................................................................... 1 Installation ......................................................................................... 2 Install oracle-maven-sync .............................................................. 2 Using Maven ..................................................................................... 3 TopLink JAXB and JSON .............................................................. 4 TopLink JPA .................................................................................. 4 TopLink Data Services................................................................... 5 TopLink and Coherence ................................................................ 6 Using Maven with Oracle TopLink Introduction Maven is one of the most popular build management systems and with the 12.1.2 release TopLink includes POM files for all jars as well as a utility to install them into your Maven repository. This document describes how to install TopLink into your Maven repository, the Maven coordinates for all TopLink jars, and which dependencies are required for different usage scenarios including Java SE, Java EE in WebLogic, and using TopLink with Oracle Coherence. 1 Using Maven with Oracle TopLink Installation Like other Oracle Fusion Middleware components, TopLink 12.1.2 provides support for developing with Maven by providing
    [Show full text]
  • Extension Des Systèmes De Métamodélisation Persistant Avec La Sémantique Comportementale Youness Bazhar
    Extension des systèmes de métamodélisation persistant avec la sémantique comportementale Youness Bazhar To cite this version: Youness Bazhar. Extension des systèmes de métamodélisation persistant avec la sémantique comporte- mentale. Autre [cs.OH]. ISAE-ENSMA Ecole Nationale Supérieure de Mécanique et d’Aérotechique - Poitiers, 2013. Français. NNT : 2013ESMA0019. tel-00939900 HAL Id: tel-00939900 https://tel.archives-ouvertes.fr/tel-00939900 Submitted on 31 Jan 2014 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. ENSMA : Ecole Nationale Supérieure de Mécanique et d’Aérotechnique LIAS : Laboratoire d’Informatique et d’Automatique pour les Systèmes THESE pour l’obtention du Grade de DOCTEUR DE L'ÉCOLE NATIONALE SUPÉRIEURE DE MÉCANIQUE ET D'AÉROTECHNIQUE (Diplôme National — Arrêté du 7 août 2006) Ecole Doctorale : Science et Ingénierie pour l’Information, Mathématiques Secteur de Recherche : INFORMATIQUE ET APPLICATIONS Présentée par : Youness BAZHAR ********************************************* Handling Behavioral Semantics in Persistent Metamodeling
    [Show full text]