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
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 theConnectionProvider
should be stateless and threadsafe to be more generally useful, e.g. when injected via DIFor 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