Has anyone succeeded in using Squeryl's externalTransactionManagementAdapter with play framework 2.0?:
object Global extends GlobalSettings {
override def onStart(app: Application) {
SessionFactory.externalTransactionManagementAdapter = Some(() =>
Some(new Session(
DB.getDataSource().getConnection(),
dbAdapter)
)
)
}
I am not able to get Squeryl to return the connections to the pool.
It does work with SessionFactory.concreteFactory
, but then I have to use transaction blocks instead of squeryl participating in Play's transaction management.
This question is a more specific variant of my earlier question: How to integrate the Scala Squeryl ORB with play 2.0 framework?.