Is there a way to avoid recreating the connection pool to an in-memory database when reloading after a code change?
[info] - application - Shutting down connection pool.
[info] - application - Creating Pool for datasource 'default'
[info] - play.api.db.DefaultDBApi - Database [default] connected at jdbc:h2:mem:play
Even if you modify something that's not related to the database, Play shuts down the connection pool and recreates it right after. There must be good reason, and if not, a workaround.
Any help appreciated.
run
instead of~run
, see this and this). Play's documentation says "Play will check your project and recompile required sources". Why is it required to recreate the connection pool? – Anselme@Singleton
and injecting it... but I have not fully guiced my app yet.. I hope we can figure this out! Clearly it is possible because Netty stays up between compiles. – Charles