This sample shows teachable Oracle Universal Connection Pool (UCP) configurations for Spring Boot applications that connect to Oracle AI Database. Each configuration is isolated in a Spring profile so you can compare pool sizing, timeout, validation, harvesting, statement cache, connection labeling, pool metrics, diagnostics, and Database Resident Connection Pooling (DRCP) settings without changing Java code.
What this sample demonstrates
Testcontainers
Disposable Oracle AI Database Free containers for repeatable local and integration tests.
Use when tests need real database behavior without sharing a long-lived development instance.
Spring
Spring framework samples for data access, messaging, configuration, and application wiring.
Use when Java applications need Spring-managed components backed by Oracle AI Database.
Highlights
- UcpApplication: The Spring Boot entry point.
- PoolReport: Captures the active UCP configuration from the PoolDataSource.
- PoolMetrics: Captures runtime UCP pool statistics such as total, borrowed, available, pending, wait, and cumulative borrow/return counts.
- PoolDiagnostics: Captures UCP diagnostic settings, JMX status, metric update interval, and registered pool names.