Skip to content

Commit

Permalink
Added a Akka-Kernel for each Scala-Actor-Type.
Browse files Browse the repository at this point in the history
  • Loading branch information
fbettag committed Dec 26, 2011
1 parent 69c8595 commit 5fec62f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
9 changes: 1 addition & 8 deletions scala/src/main/scala/AkkaActor.scala
Expand Up @@ -9,20 +9,13 @@ import akka.util.duration._
import akka.dispatch._


class AkkaActorKernel extends Bootable {
class ActorKernel extends Bootable {
val system = ActorSystem("AkkaTest")
val runs = 12000000

def startup = {
val testActor = system.actorOf(Props[CounterActor], "test")
runTest(testActor, runs)

printf("--%n")
ag.bett.scala.test.lift.CounterClient.run(runs)

printf("--%n")
ag.bett.scala.test.scala.CounterClient.run(runs)

shutdown
sys.exit(0)
//system.eventStream.subscribe(mgmt, classOf[RemoteLifeCycleEvent])
Expand Down
15 changes: 15 additions & 0 deletions scala/src/main/scala/LiftActor.scala
@@ -1,9 +1,24 @@
package ag.bett.scala.test.lift

import net.liftweb.actor._
import akka.kernel._
import scala.compat.Platform


class ActorKernel extends Bootable {
val runs = 12000000

def startup = {
ag.bett.scala.test.lift.CounterClient.run(runs)
shutdown
}

def shutdown = sys.exit(0)

}



case object GetAndReset
case class AddCount(number:Long)

Expand Down
14 changes: 14 additions & 0 deletions scala/src/main/scala/ScalaActor.scala
Expand Up @@ -4,6 +4,20 @@ import scala.actors.Actor
import scala.actors.Actor._
import scala.compat.Platform
import scala.actors.Scheduler
import akka.kernel._


class ActorKernel extends Bootable {
val runs = 12000000

def startup = {
ag.bett.scala.test.scala.CounterClient.run(runs)
shutdown
}

def shutdown = sys.exit(0)

}


case object GetAndReset
Expand Down

0 comments on commit 5fec62f

Please sign in to comment.