From: "Ross A. Baker" <ba...@alumni.indiana.edu>
Date: Wed, 27 Apr 2011 10:46:30 -0400
Local: Wed, Apr 27 2011 10:46 am
Subject: Re: [scalatra-user] Re: MySQL connection pooling with C3P0
withValue one sets the value for the life of the block you pass it, so
dlSession would be null again after the before filter. I think you want: before { after { Alternatively you could implement Handler: trait DlSessionSupport extends Handler { abstract override def handle(req: HttpServletRequest, resp: class DailyLifFilter extends ScalatraFilter with ScalateSupport On Wed, Apr 27, 2011 at 10:36 AM, Dustin Withers <fadedd...@gmail.com> wrote: -- > Where should I bind that variable? In a companion object to the > Filter? Or should I still do it in my Filters class? Like: > class DailyLifFilter extends ScalatraFilter with ScalateSupport with > DatabaseInit { > val dlSession = new DynamicVariable[Session](null) > before { > after { > On Apr 27, 9:12 am, Wille Faler <wille.fa...@gmail.com> wrote: >> On 27 April 2011 15:10, Dustin Withers <fadedd...@gmail.com> wrote: >> > Should something like the following work? >> > class DailyLifFilter extends ScalatraFilter with ScalateSupport { >> > before { >> > after { >> > Thanks, >> > On Apr 27, 9:01 am, Wille Faler <wille.fa...@gmail.com> wrote: >> > > session.close >> > > On 27 April 2011 14:37, Dustin Withers <fadedd...@gmail.com> wrote: >> > > > Hello all, >> > > > I'm new to Scala and new to Scalatra, heck I'm kinda new to Java web >> > > > Originally I wasn't using any kind of connection pooling and I >> > > > I've played with all of C3P0's settings and I can stave off the >> > > > Any thoughts? Should I bother the people on the Squeryl mailing list? >> > > > Thanks much for your time, Ross A. Baker ba...@alumni.indiana.edu Indianapolis, IN, USA You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||