Skip to content

Commit

Permalink
Merge pull request playframework#581 from jroper/invoker-config
Browse files Browse the repository at this point in the history
Ensured invoker loads play akka configuration
  • Loading branch information
ph2734 committed Nov 28, 2012
2 parents 868463a + adfa848 commit 0561e8b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions framework/src/play/src/main/scala/play/core/system/Invoker.scala
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
package play.core

import akka.actor._
import akka.actor.Actor._

import com.typesafe.config._
import play.api.{Logger, Play}

/**
* provides Play's internal actor system and the corresponding actor instances
*/
private[play] object Invoker {

val system: ActorSystem = ActorSystem("play")
private def loadActorConfig = {
val config = Play.maybeApplication.map(_.configuration.underlying).getOrElse {
Logger("play").warn("No application found at invoker init")
ConfigFactory.load()
}
config.getConfig("play")
}

val system: ActorSystem = ActorSystem("play", loadActorConfig)

val executionContext: scala.concurrent.ExecutionContext = system.dispatcher

Expand Down

0 comments on commit 0561e8b

Please sign in to comment.