I have a io.agroal.springframework.boot.AgroalDataSource and I wrap it into another DataSource like DelegatingDataSource, for example. After that I need to unwrap it to retrieve the AgroalDataSource. For this purpose I tried DataSourceUnwrapper doing the following:
But I get null.
This is due to implementation of methods isWrapperFor and unwrap in class io.agroal.springframework.boot.AgroalDataSource are delegating into the underlying datasource.
I have a workaround, extending io.agroal.springframework.boot.AgroalDataSource, and implemeting these methods:
But It will be nice if Agroal take into account this use case and apply this changes in its source code.