dotCMS / dotCMS/core

Task 3.4: Migrate Database Connection Libraries

Open
#32,686 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team : Platform Type : Task
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Task Description

Replace dot.commons-dbcp and dot.commons-pool with standard Apache Commons DBCP2 and Pool2

Status: 🔄 PENDING
Scope
  • Remove dot.commons-dbcp and dot.commons-pool from POM files
  • Migrate to org.apache.commons:commons-dbcp2 and org.apache.commons:commons-pool2
  • Update database connection pooling configurations
  • Test database connection pooling and verify no connection leaks
Implementation Plan
  1. Analysis Phase:

    • Review current DBCP and Pool usage patterns
    • Identify database connection pool configurations
    • Document connection pool settings and parameters
  2. Dependency Update:

    • Remove com.dotcms.lib:dot.commons-dbcp from BOM and dotCMS POM
    • Remove com.dotcms.lib:dot.commons-pool from BOM and dotCMS POM
    • Add org.apache.commons:commons-dbcp2 to BOM with appropriate version
    • Add org.apache.commons:commons-pool2 to BOM with appropriate version
  3. Code Migration:

    • Find all imports: com.dotcms.repackage.org.apache.commons.dbcp.*
    • Replace with: org.apache.commons.dbcp2.*
    • Find all imports: com.dotcms.repackage.org.apache.commons.pool.*
    • Replace with: org.apache.commons.pool2.*
    • Update configuration classes for DBCP2 API changes
  4. Testing:

    • Test database connection pooling functionality
    • Verify connection pool sizing and limits work correctly
    • Check for connection leaks under load
    • Run database-related integration tests
Acceptance Criteria
  • [ ] Repackaged DBCP/Pool dependencies removed from POM files
  • [ ] Standard Commons DBCP2/Pool2 dependencies added to BOM
  • [ ] All database connection tests pass
  • [ ] No connection pool regressions observed
  • [ ] Connection leak tests pass
  • [ ] Database integration tests pass
Claude Assistance Benefits
  • Import Updates: Claude can systematically update DBCP/Pool imports
  • Configuration Migration: Help migrate DBCP configurations to DBCP2
  • Testing Support: Identify database connection test cases
  • Risk Assessment: Evaluate impact of connection pool changes
Related
  • Epic: #32675 - Remove Repackaged Dependencies
  • Phase: 3 - Medium-Risk Migrations
  • Priority: High
  • Estimated Effort: 2-3 days (with Claude assistance)
Technical Notes
  • DBCP2 has API changes from DBCP1.x
  • Pool2 has API changes from Pool1.x
  • Critical for database performance and stability
  • Connection pool configurations may need updates
  • Memory and performance implications
Risk Mitigation
  • Comprehensive database connection testing
  • Connection leak detection and monitoring
  • Performance testing under load
  • Rollback plan for connection pool changes
  • Gradual migration approach if needed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the BOM and dotCMS POM files first, then search for the listed repackaged DBCP and Pool imports and the database connection-pool configuration classes. Run the database-related integration tests and connection-pooling checks. Done means the repackaged dependencies and imports are removed, standard DBCP2/Pool2 dependencies are configured, and database, leak, and regression tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.