Connections unexpectedly closed when using DB.use with a JNDI datasource with squerylrecord #950

ebiggs opened this Issue Mar 27, 2011 · 6 comments


None yet

4 participants

ebiggs commented Mar 27, 2011

[[url:|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.

To reproduce:

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.


Sorry for not updating this sooner. I have been able to reproduce the issue with your test case, thanks for that. I'm planning on getting this fixed for 2.4, I just haven't had time for the deeper dive into DB and Squeryl's external transaction management that it will require. Hopefully I've have more for you soon.


Updating tickets (#919, #938, #950, #956, #976, #980, #982, #999, #1008, #1024, #1025, #1032, #1034, #1051)


Updating tickets (#950, #956, #976, #980, #982, #999, #1008, #1053, #1078, #1092, #1097)

Pushed pending tickets to 2.4-M5

@davewhittaker davewhittaker was assigned Mar 1, 2012
This was referenced Mar 1, 2012

Closing as I'm pretty sure this will be cleared up with #1266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment