gnodet-bot commented on code in PR #26845:
URL: https://github.com/apache/camel/pull/26845#discussion_r4124994804


##########
components/camel-jdbc/src/main/docs/jdbc-component.adoc:
##########
@@ -336,3 +336,27 @@ from("timer://MoveNewCustomersEveryHour?period=3600000")
         .setBody(simple("insert into processed_customer 
values('${body[ID]}','${body[NAME]}')"))
         .to("jdbc:testdb");
 ----
+
+== Secret Rotation
+
+The JDBC component implements `SecretRotationAware`. When a secret rotation 
event is triggered
+(e.g. by a vault provider), the component evicts stale connections from its 
connection pools.
+This covers the component-level DataSource as well as any DataSources resolved 
by active endpoints
+(e.g. `jdbc:myDs`), with identity-based deduplication so each pool is evicted 
at most once.
+
+Currently only HikariCP pools are supported for active eviction via 
`softEvictConnections()`.
+The eviction is triggered by calling `getHikariPoolMXBean()` directly on the 
`HikariDataSource` instance
+via reflection — JMX registration (`registerMbeans=true`) is *not* required.
+Other pool implementations (including Quarkus Agroal) are not actively evicted 
— existing connections
+will be replaced as they expire or are validated by the pool.

Review Comment:
   ⚠️ **Stale docs** — this section was written before the Agroal commit and 
now contradicts `DataSourceHelper`, which actively supports Agroal via 
`flush(GRACEFUL)`.
   
   Update to reflect both supported pools:
   
   ```suggestion
   Currently HikariCP and Agroal (Quarkus default) pools are supported for 
active eviction.
   HikariCP pools are evicted via `softEvictConnections()` called through 
`getHikariPoolMXBean()`
   via reflection — JMX registration (`registerMbeans=true`) is *not* required.
   Agroal pools are evicted via `flush(GRACEFUL)` called on `AgroalDataSource` 
via reflection.
   Other pool implementations are not actively evicted — existing connections
   ```
   
   The same fix is needed in `sql-component.adoc` (both source and catalog 
copies) and `catalog/.../jdbc-component.adoc`.
   
   Also update the NOTE block below to mention the Agroal reflection classes 
that need GraalVM native registration (`AgroalDataSource.flush`, 
`AgroalDataSource.FlushMode`).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to