Mastering Java Persistence API (JPA): Realize Java’s Capabilities Spanning RDBMS, ORM, JDBC, Caching, Locking, Transaction Management, and JPQL
- Length: 258 pages
- Edition: 1
- Language: English
- Publisher: BPB Publications
- Publication Date: 2022-03-12
- ISBN-10: 9355511264
- ISBN-13: 9789355511263
- Sales Rank: #344294 (See Top 100 Books)
Filled with sample case study, exercises, commonly faced issues/solutions, and important interview questions, this book is surely going to help developers to expand their skills in JPA.
Key Features
- Covers every JPA capability with detailed examples.
- Explanation of popular JPA providers in detail as well as sample JPA code.
- Includes solutions geared toward developers, interview questions, and expert advice.
Description
‘Mastering Java Persistence API’ is geared towards experiencing the functioning of JPA and the extent of its use in Java SE and Java EE applications. While the book’s primary objective is to develop competence in JPA, it also takes a simpler approach to refresh readers on basic database management system concepts and how to design simple JPA applications.
The book begins with the ideas like ORM, EJB CMP, and the difficulties associated with data conversion from a database to an application and vice versa are handled spontaneously. The book discusses Table, Row, Column, Cell, and various forms of Relationships and progress sequentially through the JPA concepts. It also discusses database processes such as identity generation, sequencing, locking, querying, persisting, caching, and transaction management in detail and emphasizes how JPA handles them. Further, the book covers the architecture and setup of two of the most extensively used JPA provider implementations (Hibernate and EclipseLink) in detail.
Additionally, this book includes sample functioning code for connecting to a MySQL database.
Each JPA functionality is illustrated with a code snippet, making it easier to modify these features as the application develops. This book teaches both beginners and seasoned professionals how to integrate JPA concepts in their employment through numerous problems and answers spanning each of the topics.
What you will learn
- Refresh your knowledge of relational database management system concepts in an object-oriented approach.
- Using JPA, you can create a table, row, column, key, query, data type, etc.
- Prepare for your first JPA project by working through the Mavenized Sample working code.
- Identify various ways for object-oriented representation of relationships.
- Acquire proficiency in various approaches for storing, caching, and transaction management.
- Discover the inner workings of JPA providers, Hibernate, and EclipseLink, as well as their architecture.
Who this book is for
This book is aimed at Java developers who wish to master JPA and develop JPA-based applications enthusiastically.
To get the most out of this book, you should have a basic familiarity with Java programming.
Cover Page Title Page Copyright Page Foreword Dedication Page About the Author About the Reviewers Acknowledgement Preface Errata Table of Contents Section - I: Introduction 1. Java Persistence API and Object-Relational Mapping Introduction Structure Objectives Java Persistence Databases Object-Relational Definitions Object-Relational Model Object-Relational Mapping Object-Relational Impedance Mismatch Conceptual differences Data type differences Data handling differences Data Composition Differences Transactional differences Integrity differences Solution for Mismatch Java Persistence API (JPA) History of JPA Other Persistence Specs Advantages of JPA/ORM Persistence Products Conclusion Abbreviations Multiple Choice Questions Answers Questions Key Terms Points to Ponder References 2. Tables– Attributes and Embeddable Objects Introduction Structure Objectives Tables Mapping Entity class Access modes Attributes Date and time attributes Enumerations LOBs, BLOBs, CLOBs, and Serialization Lazy fetching Column definition and schema generation Insertable, updatable, read only fields Conversion Custom types Embeddables Sharing Embedded Id Nesting Inheritance Relationships Collections Querying Mapping – Advanced Multiple tables Multiple tables with foreign keys Conclusion Abbreviations Multiple choice questions Answers Questions Points to ponder References Section - II: Operations and Relationships 3. Operations – Identity, Sequencing and Locking Introduction Structure Objectives Operations Identity @EmbeddedId vs @IdClass Sequencing Table sequencing Sequencing objects Identity sequencing Advanced sequencing Primary keys for sequencing Composite primary keys Primary keys through events Inheritance Single table inheritance Joined and multiple table inheritance Advanced inheritance strategies Locking Optimistic locking Pessimistic locking Common mistakes or problems Advanced locking Timestamp locking Cascaded locking Field locking Read and write locking No locking (Ostrich locking) Locking - Best practices Conclusion Multiple choice questions Answers Questions Points to ponder 4. Relationships – Types and Strategies Introduction Structure Objectives Relationships JPA relationship types OneToOne relationship OneToMany/ManyToOne relationship ManyToMany relationship Embedded relationship Element collections Maps Nested collections Query optimization techniques Join fetching Lazy fetching Batch fetching Variable and heterogeneous relationships Cascading Orphan removal (JPA 2.0) Target entity Nested Joins Collections Order column (JPA 2.0) Common problems Conclusion Multiple choice questions Answers Questions Points to ponder Section - III: Runtime Access and Process Objects 5. Query Infrastructure Introduction Structure Objectives Querying Named queries Dynamic queries Query results Common query samples Optimization Advanced topics JPQL BNF Conclusion Multiple choice questions Answers Questions 6. Entity Manager – Persisting, Caching, and Transaction Introduction Structure Objectives Persisting Persist Merge Remove Advanced operations Refresh Flush Clear Close Get reference Get delegate Transactions Transaction management Join transaction Transaction failures Nested transactions Caching Object cache Data cache Query cache Cache types Stale data Solving stale data problem Clustered caching Cache transaction isolation Conclusion Multiple choice questions Answers Questions Points to ponder Section - IV: JPA Provider Implementations 7. Hibernate and EclipseLink Introduction Structure Objectives JPA providers Hibernate History Features Architecture Querying in hibernate Cache architecture EclipseLink History Features Architecture Querying Cache architecture Polyglot persistence Conclusion Multiple choice questions Answers Questions Points to ponder References Section - V: Appendix 1. JPA Advanced Topics Introduction Structure Events Entity listeners Views Stored procedure Structured object-relational data types XML data types Filters History Logical deletes Auditing Replication Partitioning Non-relational data Multi-tenancy References 2. Sample JPA Application and Questions Introduction Sample1: Simple hibernate application Sample interview questions Sample coding examples References Index
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.