my-spring-boot-experiments
  • README
  • Spring Batch implementation
  • API Example for Archunit
  • spring-boot-chaos-monkey
  • Grafana LGTM Implementation
  • MongoDb for insertion and search using elastic search
  • OpenSearch Implementation
  • spring-boot-rabbitmq-thymeleaf
  • boot-rest-docs-sample
  • boot-strategy-plugin
  • spring-boot-togglz-sample
  • spring-boot-ultimate-redis
  • GraphQL
    • spring-boot-graphql-querydsl
    • GraphQl implementation using webflux
    • GraphQl implementation using webmvc
  • httpClients
    • http-proxy
    • rest-template
    • rest-client
    • web-client-mvc
    • web-client-webflux
  • jmh-benchmark
  • jpa
    • Custom Sequence
    • Hibernate Envers Implementation
    • multiple datasources using Spring Boot
    • spring-boot-hibernate2ndlevelcache-sample
    • JNDI in embedded Tomcat
    • JPA Jooq Marriage
    • JPA locks implementation
    • read-replica-with-spring-boot
    • KeySet Pagination Using Blaze
    • KeySet Pagination Using Data-JPA
    • MultiTenancy using Hibernate in Spring Data JPA
      • multitenancy-db
      • multidatasource-multitenancy
      • Partitioned (Discriminator) Data – the data for each tenant is partitioned by a discriminator value
      • schema
  • open-api-spring-boot
  • r2dbc
    • r2dbc-jooq
    • PostgreSQL JSON and enum column support
    • PostgreSQL Notify and Listen support using reactive spring boot
    • r2dbc-boot
    • reactive-cache
  • scheduler
    • Scheduling using JobRunr
    • Scheduling using Quartz
    • Scheduling using Shedlock distribution
  • Code Of Conduct
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub

jpa

Previousjmh-benchmarkNextCustom Sequence

Last updated 4 months ago

Was this helpful?

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.

All Niche Things about using JPA

Title
Description

  • 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

Custom Sequences
Custom Repository
Entity Auditing using envers
Multiple DataSources
Hibernate 2nd Level Cache
JNDI Sample
JPA JOOQ Sample
JPA Locks
Keyset Pagination
MultiTenancy
Read Replica PostgreSQL