Eclipse JNoSQL

Eclipse JNoSQL™ — Modern NoSQL Persistence for Enterprise Java

Eclipse JNoSQL™ is an open-source Java framework that simplifies NoSQL persistence through Jakarta EE standards. It provides implementations and integrations for Jakarta Data and Jakarta NoSQL, and is aligned with Jakarta Query, the common query foundation of the Jakarta persistence specifications. It brings repository abstractions, object mapping, and database-specific capabilities to enterprise Java applications.

One framework covers six NoSQL database models: Key-Value, Document, Wide-Column, Graph, Time Series, and Vector. Developers keep a familiar, annotation-based and CDI-integrated programming experience, reduce persistence boilerplate, and still reach the specific features of each database instead of being limited to the lowest common denominator.

Specification status: Jakarta Data and Jakarta NoSQL are implemented by the current code base (including derived queries, @Query, and JDQL with named parameters). Jakarta Query is not yet a dependency of the Eclipse JNoSQL modules, so its integration is under development and is not presented here as a released capability.

Built on Jakarta EE Standards

Eclipse JNoSQL is designed around three Jakarta EE specifications, each covering a different concern.

Jakarta Data

Jakarta Data standardizes repository-oriented persistence.

  • Repository interfaces — declare an interface and let JNoSQL provide the implementation.
  • Derived queries — queries built from method names such as findByName.
  • Query capabilities — annotation-based queries (@Query) and the Jakarta Data Query Language (JDQL), including named parameters.
  • Pagination — pagination and sorting through the standard Limit, Sort, and PageRequest types.

This removes most of the persistence boilerplate:

@Repository
public interface ProductRepository extends BasicRepository<Product, String> {

    List<Product> findByName(String name);

    List<Product> findByPriceLessThan(BigDecimal price);
}

Jakarta NoSQL

Jakarta NoSQL defines mapping and persistence for NoSQL databases.

  • Entity mapping — @Entity, @Id, @Column, @Embeddable, and @Convert, among others.
  • Database-specific persistence models — Key-Value, Document, and Wide-Column in the specification, extended by JNoSQL with Graph, Time Series, and Vector.
  • Templates — Template and model-specific templates for operations beyond conventional CRUD, such as time to live (template.insert(entity, Duration)).
  • CDI integration — entities, templates, and repositories are discovered and injected through CDI.
  • Provider flexibility — the same mapping works across databases of the same model.

Jakarta NoSQL provides abstractions suited to NoSQL databases rather than treating every NoSQL database as a relational one.

@Entity
public class Product {

    @Id
    private String id;

    @Column
    private String name;

    @Column
    private BigDecimal price;

    // constructors, getters, and setters
}

@Inject
Template template;

template.insert(new Product("p-1", "Keyboard", new BigDecimal("49.90")));
Optional<Product> product = template.find(Product.class, "p-1");

Jakarta Query

Jakarta Query is the common query foundation for Jakarta persistence technologies.

  • Common query concepts and a shared language, rather than one dialect per specification.
  • Reusable query expressions across Jakarta Data and Jakarta NoSQL.
  • Type-oriented query capabilities where supported.
  • Consistency across Jakarta persistence specifications.

Jakarta Query is a specification-level foundation, not an extra runtime service. Jakarta Data and Jakarta NoSQL build on the same query concepts, and Eclipse JNoSQL is the layer that executes them against databases. Its support in JNoSQL is under development, and not every Jakarta Query feature is expected to be available in every database integration.

Architecture

graph TB APP["Java applications"] subgraph SPEC ["Specification layer"] DATA["Jakarta Data"] NOSQL["Jakarta NoSQL"] QUERY["Jakarta Query - integration under development"] end subgraph IMPL ["Implementation layer"] JNOSQL["Eclipse JNoSQL"] end DB["Database integrations"] APP --> DATA APP --> NOSQL DATA -.-> QUERY NOSQL -.-> QUERY DATA --> JNOSQL NOSQL --> JNOSQL JNOSQL --> DB
Specification Repository
Jakarta Data jakartaee/data
Jakarta NoSQL jakartaee/nosql
Jakarta Query jakartaee/query

One Framework. Six Database Models.

Use the right NoSQL model for your application while keeping a familiar, standards-oriented Java programming experience.

Model Description Typical use cases
Key-Value Efficient key-based data access. Caching, session management, fast lookups
Document Flexible document-oriented persistence. Product catalogs, content, user profiles
Wide-Column Distributed column-family data storage. Large datasets, high-throughput applications, distributed systems
Graph Relationship-oriented data access and traversal. Fraud detection, relationship analysis, recommendations
Time Series Time-indexed data storage and retrieval. Metrics, financial events, monitoring, IoT
Vector High-dimensional vector persistence and similarity-oriented retrieval. Semantic search, recommendations, embeddings, AI-assisted applications, RAG

Time series

Financial events and other time-indexed records are mapped as regular entities, using the jnosql-mapping-timeseries module and TimeSeriesTemplate:

@Entity
public class BankTransaction {

    @Id
    private Instant timestamp;

    @Column
    private String account;

    @Column
    private BigDecimal amount;

    // constructors, getters, and setters
}

@Inject
TimeSeriesTemplate template;

List<BankTransaction> recent = template.select(BankTransaction.class)
        .where("account").eq("acc-1")
        .latest(10);

Vector databases

Vector persistence is a general database capability: similarity search, recommendations, and retrieval over embeddings are only some of its uses. The jnosql-mapping-vector module adds:

  • VectorTemplate — extends the Jakarta NoSQL Template with vector similarity search.
  • Vector — the base type of a persisted vector attribute.
  • DenseVector — a value for every dimension, typical for model embeddings.
  • SparseVector — only non-zero values and their positions.
  • MultiVector — one logical value represented by several dense vectors.
@Entity
public class ProductEmbedding {

    @Id
    private String id;

    @Column
    private String description;

    @Column
    private Vector embedding;

    // constructors, getters, and setters
}

@Inject
VectorTemplate template;

Vector queryVector = DenseVector.of(0.10F, 0.42F, 0.80F);

List<ProductEmbedding> similar = template.search(ProductEmbedding.class)
        .vector(queryVector)
        .limit(Limit.of(10))
        .result();

See the supported databases for the integrations available for each model.

Why Eclipse JNoSQL

  • Increase productivity performing common NoSQL operations
  • Rich object mapping integrated with Contexts and Dependency Injection (CDI)
  • Repository abstractions, Java-based queries, and fluent APIs
  • Persistence lifecycle events
  • A specific template API for each NoSQL model
  • Annotation-oriented, using JPA-like naming where it makes sense
  • Extensible to explore the particular behavior of each NoSQL database
  • Apache TinkerPop integration for graph databases

Get started