Mansart is the persistence layer of the Vidocq ecosystem. It implements Jakarta Data 1.0 (declarative repositories) and Jakarta Persistence 3.2 within its documented scope, alongside a Jakarta Transactions 2.0 transaction manager and a virtual-thread-native JDBC connection pool. Independent bricks, separate Data/JPA dialect SPIs, APT + Class-File API entity access — no reflective entity-state access or dynamic proxies.

Origin of the name

Jules Hardouin-Mansart (1646-1708), First Architect to King Louis XIV. He designed the Hall of Mirrors at Versailles, the Invalides dome, the Place Vendôme, the Grand Trianon. He led the Royal Academy of Architecture, codified the architectural orders, negotiated with masons and sculptors. His work has stood for three centuries because every piece was designed to fit into the next, and decoration was never confused with structure.

The Mansart persistence layer applies the same separation: the foundation of an information system is invisible, yet it carries everything else. See the Wikipedia entry.

At a glance

Specs implemented

Jakarta Data 1.0 + Jakarta Persistence 3.2 (scope-based P0–P12 delivery) + Jakarta Transactions 2.0

Repository

codefloe.com/Vidocq/mansart

Java

25 (LTS)

Java modules

io.vidocq.mansart.data.core, io.vidocq.mansart.data.cdi, io.vidocq.mansart.data.dialect., io.vidocq.mansart.jpa., io.vidocq.mansart.pool.api, io.vidocq.mansart.pool.core, io.vidocq.mansart.transactions.{api,core,cdi,jdbc}

Runtime dependencies

Jakarta specs only (jakarta.data-api, jakarta.persistence-api, jakarta.transaction-api, jakarta.inject-api, jakarta.cdi-api). JDBC in the JDK. Drivers provided.

Threading

Virtual threads everywhere — no platform pool. The transaction context is carried in a ThreadLocal — a deliberate choice: the Jakarta Transactions API is imperative (begin() returns, commit() comes later from arbitrary call sites), which cannot fit ScopedValue’s enclosing-scope model; `ThreadLocal works on virtual threads exactly as on platform threads.

Codegen

APT (metamodel, *RepositoryImpl). The pool’s Connection wrapper is a plain hand-written class. Zero ASM/Byte Buddy, no dynamic proxies.

TCK

Jakarta Data 1.0 74/74; Persistence 2131 passes and four official skips with local fixture patch TCK-BUG-001 (not certification); Transactions smoke 5/5. See detailed status.

Sub-modules

Mansart breaks down into four runtime-independent sub-projects, organized as layers:

Sub-module Role Dedicated page

mansart-pool

Virtual-thread-native JDBC pool, zero-dep, alternative to HikariCP.

mansart-pool

mansart-transactions

Jakarta Transactions 2.0 transaction manager (TransactionManager, UserTransaction, @Transactional).

mansart-transactions

mansart-jakarta-data

Jakarta Data 1.0 implementation — repositories, query methods, JDQL, JDBC dialects (H2, PostgreSQL).

mansart-jakarta-data

mansart-persistence

Jakarta Persistence 3.2: EntityManager, JPQL/Criteria, mapping, cache and validation integration; P0–P12 delivered within documented boundaries. Maven parent mansart-jpa.

mansart-persistence

Layered architecture

Diagram

Each layer can be used independently: mansart-pool is a standalone DataSource, mansart-transactions does not know about Jakarta Data, and mansart-jakarta-data works without the Mansart pool if the application supplies its own.

Position in the ecosystem

Diagram

Vauban provides the CDI bootstrap (BCE) that discovers @Repository interfaces and turns them into @ApplicationScoped beans, plus the @Transactional interceptor. Vidocq Runtime orchestrates packaging and startup.