jpa
Last updated
Last updated
Java Persistence API (JPA) is a Java application programming interface specification that describes the management of relational data in applications using Java Platform, Standard Edition and Java Platform, Enterprise Edition. It provides an object-relational mapping (ORM) facility for the Java language, allowing developers to interact with databases through the use of Java objects. JPA allows developers to easily persist and query data in a database, providing a simple and standardized approach to data persistence and management.
Implements CustomSequence Generation like ORD000001
Uses instead of OOTB spring data repository
Logging SQL Statements using DataSourceProxy
Connections Acquiring Optimization using LazyConnectionDataSourceProxy
Version History and Auditing of db using spring data envers based on Hibernate Envers
Track who changed what and when
Revert or compare entity versions over time
Connects to both PostgreSQL and MySQL databases
Uses Liquibase for Postgres and Flyway for MySQL migrations
Demonstrates data merging from multiple sources
Implements Redis-based second-level caching
Reduces database round-trips for frequently accessed data
Demonstrates caching of entities and collections
Demonstrates JNDI usage with embedded Tomcat
Uses Hikari DataSource for connection pooling
Combines JPA and JOOQ in a blog post management system
Demonstrates complex entity relationships (posts, comments, tags)
Shows both JPA and JOOQ-based data access patterns
Demonstrates transaction isolation levels
Shows different propagation behaviors
Handles concurrent data access scenarios
Implements efficient pagination for large datasets
Includes implementations using:
Spring Data JPA Window functions
Blaze Persistence for dynamic queries
Implements multiple multi-tenancy strategies:
Partition-based (Discriminator)
Schema-based
Database-based
Multi-DataSource with mixed strategies
Implements read/write splitting with PostgreSQL
Routes reads to replica and writes to primary
Uses LazyConnectionDataSourceProxy for runtime routing