Open Source Persistence Frameworks in Java
40 projectsApache Cayenne is a Java ORM with CayenneModeler GUI, DB-first flow, transparent transactions, and optional field-level encryption.
Apache OpenJPA is a JPA/Jakarta Persistence implementation. Use as a stand-alone POJO persistence layer or in Java EE and lightweight frameworks.
Butterfly Persistence is a lightweight Java persistence API (under 200 KB) on top of JDBC for reading and writing relational data. It provides connection management, CRUD and batch operations, and DAOs for Map and Object mapping. Object mapping supports automatic, annotation-based, and programmatic styles; supports partial reads and writes.
EclipseLink provides JPA, MOXy (JAXB/XML/JSON), DBWS, and NoSQL support. Open-source Java persistence for relational, XML, and REST.
Lightweight Model Layer (LML) is a small Java persistence engine using annotations and reflection; zero XML, no dependencies. For standalone and web apps. Original paquitosoft.
Prevayler is an open-source prevalence layer for Java: business objects are kept in memory and transactions are journaled for recovery. It provides ACID persistence for plain Java objects with minimal configuration. Read operations can be orders of magnitude faster than traditional DBMS access via JDBC when the working set fits in RAM.
BeanKeeper is an O/R mapping library: map Java objects to a relational database with a query service. NetMind site gone; code on GitHub.
Java Ultra-Lite Persistence (JULP) is a small (~300KB) ORM: inheritance, optimistic locking, many tables per class, container and stand-alone.
O/R Broker externalizes SQL into files and maps result sets to arbitrary POJOs (not just JavaBeans); supports inheritance and circular refs. Simple XML config.
QLOR (Q-LOGIC Object Relational Mapping Framework) is a performant ORM and persistence/query framework for Java. It supports O2O, O2M and M2M mappings, multiple and cascading primary keys, inheritance and multi-inheritance mapping, programmatic and multi-file mappings, optional database encryption, and multi-database support.
Space4J (S4J) is a prevalence implementation for Java: objects are kept in memory and persisted via memory snapshots, transaction logs, and serialization. It offers transparent support for clustering, passivation, and indexing so that objects are available in RAM across restarts without manual save logic.
TriActive JDO (TJDO) is an open-source implementation of the JDO specification (JSR 12) for transparent persistence with JDBC-compliant databases. It maps Java classes to tables or SQL views, supports JDOQL, and can auto-create or validate schema. Lightweight and designed for stability and low memory use.
Velosurf is a database mapping layer for Apache Velocity: automatic mapping of tables and relationships without code generation, with transactions, connection pooling, and optional auth and i18n. Can be used as a Velocity tool or as a standalone Java database abstraction layer.
XORM is an extensible object-relational mapping layer for Java that implements the JDO (JSR 12) API. It allows persistence-capable classes via abstract classes or interfaces with runtime-enhanced get/set methods, without a class-file enhancer. Supports mapping to existing or new schemas.
Athena Framework is a metadata-based Java ORM: metadata as mapping config, EJBQL, code generation, multi-tenancy for cloud SaaS. Integrates with Struts or Spring. Original athenasource.
Persistence4J is a simple Java library for persisting data into relational databases without writing DTOs: create a POJO and save it via the library. Integrates with the Java Transaction API (JTA). Written in Java with a minimum of Java 1.