verify-persistence

Validate persistence.xml data sources use environment variables and flag hardcoded paths.

224|136|Updated Jul 12, 2014
One-click install
npx skills add https://github.com/hmislk/hmis --skill verify-persistence
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: verify-persistence
Source: https://github.com/hmislk/hmis/tree/main/.claude/skills/verify-persistence
Command: npx skills add https://github.com/hmislk/hmis --skill verify-persistence

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps ensure that persistence.xml configuration uses environment variables for data sources, preventing hard-coded values from causing deployment failures.

Core Features & Use Cases

  • Validation: Checks that the main and audit datasources reference environment variables (e.g. ${JDBC_DATASOURCE}, ${JDBC_AUDIT_DATASOURCE}) and not hardcoded JNDI names.
  • Safety: Flags any DDL generation paths that rely on local or absolute file system locations.
  • Use Case: Before pushing code, run this skill to verify that persistence.xml is deployment-ready in QA and staging environments.

Quick Start

Run the Verify Persistence check against the project's persistence.xml to confirm readiness for deployment.

Frequently Asked Questions about verify-persistence

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check persistence.xml for hardcoded JNDI names before deployment?▼

To check persistence.xml for hardcoded JNDI names, validate the file to ensure data sources use environment variables like ${JDBC_DATASOURCE} and ${JDBC_AUDIT_DATASOURCE}. This prevents QA deployment failures caused by hard-coded credentials.

What environment variables should be used for data sources in Java EE persistence configuration?▼

Java EE persistence configuration should use ${JDBC_DATASOURCE} for the main datasource and ${JDBC_AUDIT_DATASOURCE} for the audit datasource. Validating these environment variables ensures deployment readiness across QA and staging environments.

Can I automate persistence.xml validation as a pre-commit or pre-push check?▼

You can automate persistence.xml validation as a pre-commit or pre-push check to catch hardcoded credentials and local file paths early. This ensures Java EE projects remain deployment-ready before reaching QA environments.

How do I prevent hardcoded DDL generation paths in persistence.xml from breaking QA deployments?▼

To prevent hardcoded DDL generation paths from breaking QA deployments, validate persistence.xml to flag any local or absolute file system locations. Replacing them ensures safe DDL generation across staging environments.