r2dbc / r2dbc-pool

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

Confused by document: Why “Creates a ConnectionPool wrapping an underlying ConnectionFactory” comment appear with `ConnectionFactory` creations? #146

Closed Jason5Lee closed 2 years ago

Jason5Lee commented 2 years ago

Does it actually mean “Creates a ConnectionFactory wrapping an underlying ConnectionPool”?

mp911de commented 2 years ago

No, it means what it says: ConnectionFactories.get("r2dbc:pool:<my-driver>:…) asks the pool (Connection Pool) to configure a my-driver ConnectionFactory and then the pool uses my-driver to obtain connections from.

Jason5Lee commented 2 years ago

If I create a connection from the connection factory created from the get method, is it from the pool?

mp911de commented 2 years ago

Yes, it's a pooled one.