play-jooq icon indicating copy to clipboard operation
play-jooq copied to clipboard

Avoid caching Connection in ConnectionProvider

Open lukaseder opened this issue 8 years ago • 0 comments

This practice has been seen a couple of times on the internet, in various sample projects, blog posts, etc. It is generally not a good idea to cache the Connection in a ConnectionProvider, as the ConnectionProvider should be stateless and threadsafe to be more generally useful, e.g. when injected via DI

For example, this user refers to your example and will probably get it wrong: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/play-framework/tXvA76ZQsJs/BoznOslsHwAJ

lukaseder avatar Mar 26 '16 08:03 lukaseder