Skip to main content
skill CX Codex

411-frameworks-quarkus-jdbc — Claude Code skill for Quarkus JDBC

A skill for programmatic JDBC in Quarkus: Agroal DataSource, parameterized SQL, transactions, batching and Dev Services. Useful when reviewing data access.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jabrena/plinth --skill 411-frameworks-quarkus-jdbc -a claude-code
Open on GitHub

What 411-frameworks-quarkus-jdbc does

The skill covers data access in Quarkus through an injected javax.sql.DataSource backed by Agroal. It ships reference rules with good and bad code examples: PreparedStatement with bind parameters instead of string concatenation, mapping ResultSet rows into Java records via a dedicated method, and single-row queries through Optional<T> rather than assuming rs.next() succeeds.

Transactions get their own section: @Transactional service boundaries, propagation types such as TxType.REQUIRES_NEW for independent commits, and the CDI self-invocation trap where a transactional method is called past the injected proxy. There is also SQLException translation into domain exceptions with a catch-translate-rethrow shape, streaming large result sets with setFetchSize, and addBatch / executeBatch for bulk inserts.

Before touching anything, the skill insists the project compiles: run ./mvnw compile or mvn compile first, and if the build fails it stops until you fix the errors. After the changes it asks for ./mvnw clean verify or mvn clean verify. On a repo with a broken build, that gate means the skill never gets going.

What it helps with

  • replace concatenated SQL with bind parameters
  • fix self-invocation that silently skips @Transactional
  • turn SQLException into domain exceptions
  • stream a large result set without running out of memory
  • batch bulk inserts with addBatch and executeBatch

Example prompts for the agent

  • Review JDBC and SQL data access in this Quarkus project
  • Improve transactions and parameter binding for Quarkus JDBC
  • Review Agroal DataSource usage in this module

How to install 411-frameworks-quarkus-jdbc

1Skills CLI (Vercel)

npx skills add jabrena/plinth --skill 411-frameworks-quarkus-jdbc -a claude-code

2Manually: put the files in place

~/.claude/skills/411-frameworks-quarkus-jdbc/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/411-frameworks-quarkus-jdbc/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about 411-frameworks-quarkus-jdbc

How do I install 411-frameworks-quarkus-jdbc in Claude?

Run npx skills add jabrena/plinth --skill 411-frameworks-quarkus-jdbc -a claude-code. The skill lands at ~/.claude/skills/411-frameworks-quarkus-jdbc/SKILL.md.

What does 411-frameworks-quarkus-jdbc do?

It walks through programmatic JDBC patterns in Quarkus: DataSource usage, parameterized SQL, transactions, batching and Dev Services for dev and test databases. It works from a reference file with code examples.

What does the skill need before it runs?

A project that compiles. The skill runs ./mvnw compile or mvn compile first and stops on build errors until they are resolved.

Source text

SKILL.md · Apache-2.0
---
name: 411-frameworks-quarkus-jdbc
description: Use when you need programmatic JDBC in Quarkus — Agroal DataSource, parameterized SQL, transactions, batching, and Dev Services. This should trigger for requests such as Review JDBC or SQL data access in a Quarkus project; Improve transactions and parameter binding for Quarkus JDBC; Translate SQLException to domain exceptions or stream large result sets; Fix CDI self-invocation bypassing @Transactional in Quarkus; Review Agroal DataSource usage in Quarkus JDBC. Part of Plinth Toolkit
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Quarkus JDBC — programmatic SQL

Apply programmatic JDBC patterns in Quarkus with safe SQL and clear transactions.

**What is covered in this Skill?**

- Injected javax.sql.DataSource (Agroal-backed) and try-with-resources for Connection / PreparedStatement
- PreparedStatement with bind parameters — never string concatenation
- Mapping ResultSet rows to Java records (dedicated mapRow method)
- Safe single-row queries with Optional<T>; never assume rs.next() succeeds
- SQLException translation to domain exceptions (catch-translate-rethrow)
- Streaming large result sets with setFetchSize to avoid OOM
- Batch updates with addBatch / executeBatch for bulk inserts
- @Transactional service boundaries and propagation types (TxType.REQUIRES_NEW for independent commits)
- CDI self-invocation pitfall: always call transactional methods through the injected proxy
- Dev Services for databases in dev/test
- When to prefer Panache (`@412`) vs raw JDBC

**Scope:** Apply recommendations based on the reference rules and good/bad code examples.

## Constraints

Compile before JDBC refactors; verify after changes.

- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change
- **PREREQUISITE**: Project must compile before applying JDBC improvements
- **SAFETY**: If compilation fails, stop immediately
- **BLOCKING CONDITION**: Compilation errors must be resolved by the user before proceeding
- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements
- **BEFORE APPLYING**: Read the reference for detailed rules and examples

## When to use this skill

- Review JDBC or SQL data access in a Quarkus project
- Improve transactions and parameter binding for Quarkus JDBC
- Translate SQLException to domain exceptions or stream large result sets
- Fix CDI self-invocation bypassing @Transactional in Quarkus
- Review Agroal DataSource usage in Quarkus JDBC

## Workflow

1. **Read reference and assess project context**

Read `references/411-frameworks-quarkus-jdbc.md` and inspect the current project setup before proposing changes.

2. **Gather scope and decide target improvements**

Identify requested outcomes, constraints, and the minimum safe set of changes to apply.

3. **Apply framework-aligned changes**

Implement or refactor configuration/code following the reference patterns and project conventions.

4. **Run verification and report results**

Execute appropriate build/tests and summarize what changed, what was verified, and any follow-up actions.

## Reference

For detailed guidance, examples, and constraints, see [references/411-frameworks-quarkus-jdbc.md](references/411-frameworks-quarkus-jdbc.md).

© Juan Antonio Breña Moral · Apache-2.0 · jabrena/plinth

Similar skills

Everything for Backend and APIs →

From the same set40

323-frameworks-spring-boot-testing-acceptance-tests Turns maintainer-sanitized Gherkin scenarios into Spring Boot acceptance tests with TestRestTemplate, Testcontainers and WireMock. CX Codex +1 324installs 401-frameworks-quarkus-core A skill that reviews and fixes the core of a Quarkus app: CDI beans, profiles, interceptors, virtual threads. Useful once the Java project already compiles. CX Codex +1 321installs 114-java-maven-search Reads outdated dependency and plugin reports from your pom.xml and helps verify Maven artifact coordinates from approved evidence. CX Codex +1 315installs 413-frameworks-quarkus-db-migrations-flyway A skill that has your coding agent add and review Flyway migrations in a Quarkus app: the quarkus-flyway extension, SQL scripts, config and ordering. CX Codex +1 313installs 701-technologies-openapi Guides you through an OpenAPI 3.x contract: spec structure, reusable schemas, security schemes, breaking-change checks. Useful when the contract lives apart from the code. CX Codex +1 309installs 303-frameworks-spring-boot-validation A skill that tells your coding agent how to design and review Spring Boot validation: Bean Validation on DTOs, @Valid at API boundaries, constraint groups and consistent 400 responses. CX Codex +1 303installs 512-frameworks-micronaut-data A skill for Micronaut Data work: entity mapping, repositories, transactions, pagination, projections and Testcontainers tests. CX Codex +1 303installs 501-frameworks-micronaut-core A skill that reviews and fixes Micronaut Java code: beans, configuration, @Requires, scheduling and blocking I/O. CX Codex +1 302installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor