Permalink
Browse files

Upgrade to Scala 2.10.0 and Akka 2.1.0

  • Loading branch information...
1 parent c3a2ee7 commit 45b5764337d2cb9fbf0651eadd25b55f8a911237 @krasserm krasserm committed Feb 2, 2013
View
@@ -9,7 +9,7 @@ import com.mojolly.scalate.ScalatePlugin.ScalateKeys._
object BuildSettings {
val buildOrganization = "dev.example"
val buildVersion = "0.5-SNAPSHOT"
- val buildScalaVersion = "2.9.2"
+ val buildScalaVersion = "2.10.0"
val buildSettings = Defaults.defaultSettings ++ Seq (
organization := buildOrganization,
@@ -20,7 +20,7 @@ object BuildSettings {
object TemplateSettings {
val templateSettings = scalateSettings ++ Seq(
- scalateTemplateDirectory.in(Compile) := new File("src/main/webapp/WEB-INF")
+ scalateTemplateConfig.in(Compile) := Seq(TemplateConfig(new File("src/main/webapp/WEB-INF"), Nil, Nil, Some("")))
)
}
@@ -34,7 +34,7 @@ object Resolvers {
}
object Versions {
- val Akka = "2.0.3"
+ val Akka = "2.1.0"
val Jersey = "1.9.1"
val Jetty = "8.0.4.v20111024"
val Spring = "3.1.0.RELEASE"
@@ -44,15 +44,15 @@ object Dependencies {
import Versions._
// compile dependencies
- lazy val akkaActor = "com.typesafe.akka" % "akka-actor" % Akka % "compile"
+ lazy val akkaActor = "com.typesafe.akka" %% "akka-actor" % Akka % "compile"
lazy val jsr311 = "javax.ws.rs" % "jsr311-api" % "1.1.1" % "compile"
lazy val jerseyCore = "com.sun.jersey" % "jersey-core" % Jersey % "compile"
lazy val jerseyJson = "com.sun.jersey" % "jersey-json" % Jersey % "compile"
lazy val jerseyServer = "com.sun.jersey" % "jersey-server" % Jersey % "compile"
lazy val jerseySpring = "com.sun.jersey.contribs" % "jersey-spring" % Jersey % "compile"
- lazy val eventsourced = "org.eligosource" %% "eventsourced" % "0.4.1" % "compile"
- lazy val scalate = "org.fusesource.scalate" % "scalate-core" % "1.5.2" % "compile"
- lazy val scalaStm = "org.scala-tools" %% "scala-stm" % "0.5" % "compile"
+ lazy val eventsourced = "org.eligosource" %% "eventsourced" % "0.5-SNAPSHOT" % "compile"
+ lazy val scalate = "org.fusesource.scalate" %% "scalate-core" % "1.6.1" % "compile"
+ lazy val scalaStm = "org.scala-stm" %% "scala-stm" % "0.7" % "compile"
lazy val scalaz = "org.scalaz" %% "scalaz-core" % "6.0.4" % "compile"
lazy val springWeb = "org.springframework" % "spring-web" % Spring % "compile"
@@ -65,7 +65,7 @@ object Dependencies {
lazy val configgy = "net.lag" % "configgy" % "2.0.0" % "runtime"
// test dependencies
- lazy val scalatest = "org.scalatest" %% "scalatest" % "1.8" % "test"
+ lazy val scalatest = "org.scalatest" %% "scalatest" % "1.9.1" % "test"
}
object ExampleBuild extends Build {
@@ -1 +1 @@
-addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.2.2")
+addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.4.2")
View
@@ -1 +1 @@
-sbt.version=0.12.0
+sbt.version=0.12.2
@@ -18,8 +18,8 @@ package org.eligosource.eventsourced.example
import scalaz.Validation
package object domain {
- type DomainValidation[A] = Validation[DomainError, A]
- type DomainError = List[String]
+ type DomainValidation[+α] = ({type λ[α]=Validation[DomainError, α]})#λ[α]
+ type DomainError = List[String]
object DomainError {
def apply(msg: String): DomainError = List(msg)
@@ -15,12 +15,12 @@
*/
package org.eligosource.eventsourced.example.server
+import scala.concurrent.duration._
import scala.concurrent.stm.Ref
import java.io.File
import akka.actor._
-import akka.util.duration._
import akka.util.Timeout
import org.eligosource.eventsourced.core._
@@ -56,12 +56,7 @@ object Appserver {
extension.channelOf(DefaultChannelProps(1, paymentGateway).withName("payment"))
extension.channelOf(DefaultChannelProps(2, multicastProcessor).withName("listeners"))
-
- extension.recover()
- // wait for processor 1 to complete processing of replayed event messages
- // (ensures that recovery of externally visible state maintained by
- // invoicesRef is completed when awaitProcessorCompletion returns)
- extension.awaitProcessorCompletion(Set(1))
+ extension.recover(10 seconds)
val invoiceService = new InvoiceService(invoicesRef, invoiceProcessor)
val statisticsService = new StatisticsService(statisticsRef)
@@ -15,12 +15,12 @@
*/
package org.eligosource.eventsourced.example.service
+import scala.concurrent._
+import scala.concurrent.duration._
import scala.concurrent.stm.Ref
import akka.actor._
import akka.pattern.ask
-import akka.dispatch._
-import akka.util.duration._
import akka.util.Timeout
import org.eligosource.eventsourced.core._
@@ -30,6 +30,7 @@ import scalaz._
import Scalaz._
class InvoiceService(invoicesRef: Ref[Map[String, Invoice]], invoiceProcessor: ActorRef)(implicit system: ActorSystem) {
+ import system.dispatcher
//
// Consistent reads
@@ -15,8 +15,9 @@
*/
package org.eligosource.eventsourced.example.service
+import scala.concurrent.Future
+
import akka.actor._
-import akka.dispatch.Future
import org.eligosource.eventsourced.core._
import org.eligosource.eventsourced.example.domain._
@@ -15,13 +15,13 @@
*/
package org.eligosource.eventsourced.example.web
+import scala.concurrent._
+import scala.concurrent.duration._
+
import javax.annotation.Resource
import javax.ws.rs._
import javax.ws.rs.core.MediaType._
-import akka.dispatch.Await
-import akka.util.duration._
-
import scalaz._
import Scalaz._

0 comments on commit 45b5764

Please sign in to comment.