gnodet opened a new issue, #9252:
URL: https://github.com/apache/camel-quarkus/issues/9252
## Context
CAMEL-24638 / apache/camel#26845 adds `SecretRotationAware` support to
`camel-jdbc` and `camel-sql`. The new
`DataSourceHelper.evictDataSourceConnections()` uses reflection to detect and
invoke pool-specific eviction methods:
### HikariCP
1. `HikariDataSource.getHikariPoolMXBean()` → returns `HikariPoolMXBean`
2. `HikariPoolMXBean.softEvictConnections()`
### Agroal (Quarkus default)
1. `AgroalDataSource.flush(FlushMode.GRACEFUL)` — resolved through the
public `io.agroal.api.AgroalDataSource` interface
## Required for GraalVM native mode
These reflection calls need to be registered in `reflect-config.json` (or
via `@RegisterForReflection`) for native builds:
### HikariCP (if used)
```json
{
"name": "com.zaxxer.hikari.HikariDataSource",
"methods": [{"name": "getHikariPoolMXBean", "parameterTypes": []}]
},
{
"name": "com.zaxxer.hikari.pool.HikariPool",
"methods": [{"name": "softEvictConnections", "parameterTypes": []}]
}
```
### Agroal
```json
{
"name": "io.agroal.api.AgroalDataSource",
"methods": [{"name": "flush", "parameterTypes":
["io.agroal.api.AgroalDataSource$FlushMode"]}]
}
```
Note: Agroal is the default pool in Quarkus, so this is the more common
path. HikariCP is not provided by default in Quarkus but can be used as an
alternative.
## References
- Camel PR: https://github.com/apache/camel/pull/26845
- Jira: https://issues.apache.org/jira/browse/CAMEL-24638
--
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]