r2dbc / r2dbc-pool

Connection Pooling for Reactive Relational Database Connectivity
https://r2dbc.io
Apache License 2.0
332 stars 55 forks source link

Add support for `Lifecycle` extension #132

Closed mp911de closed 3 years ago

mp911de commented 3 years ago

When a Connection implements Lifecycle, we should call postAllocate before returning the connection and preRelease before returning it into the pool.

Any failures on postAllocate should result in a disposal and invalidation of the connection object.

mp911de commented 3 years ago

See https://github.com/r2dbc/r2dbc-spi/issues/230 and https://github.com/r2dbc/r2dbc-spi/pull/235