Per this discussion,
the database connection is often (if not mostly) unexpectedly closed when attempting to use squerylrecord with DB.use and a JNDI DataSource.
a) Configure a JNDI DataSource in your servlet container.
b) Then in Boot.scala:
1) tell the DefaultConnectionIdentifier the appropriate jndi name.
2) call SquerylRecord.init() with the appropriate adapter.
3) use DefaultConnectionIdentifier with the DB.buildLoanWrapper and
add it to S.around
c) Use squerylrecord in such a way that it requires a Connection to the DataSource
Tests should immediately reveal that the connections squeryl tries to use are unexpectedly closed.