Thanks for the explanation and for finding the bug. I would then do this:

    override val maxAge = Play.maybeApplication.flatMap({
      c => 
        Duration(c.configuration.getMilliseconds("session.maxAge"), MILLISECONDS).toSeconds
    })

See http://www.scala-lang.org/api/current/index.html#scala.concurrent.duration.Duration for information on duration