Skip to content

Commit

Permalink
Upgrade to Scala 2.10.0 and Akka 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
krasserm committed Feb 2, 2013
1 parent c3a2ee7 commit 45b5764
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 25 deletions.
16 changes: 8 additions & 8 deletions project/ExampleBuild.scala
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.mojolly.scalate.ScalatePlugin.ScalateKeys._
object BuildSettings { object BuildSettings {
val buildOrganization = "dev.example" val buildOrganization = "dev.example"
val buildVersion = "0.5-SNAPSHOT" val buildVersion = "0.5-SNAPSHOT"
val buildScalaVersion = "2.9.2" val buildScalaVersion = "2.10.0"


val buildSettings = Defaults.defaultSettings ++ Seq ( val buildSettings = Defaults.defaultSettings ++ Seq (
organization := buildOrganization, organization := buildOrganization,
Expand All @@ -20,7 +20,7 @@ object BuildSettings {


object TemplateSettings { object TemplateSettings {
val templateSettings = scalateSettings ++ Seq( 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("")))
) )
} }


Expand All @@ -34,7 +34,7 @@ object Resolvers {
} }


object Versions { object Versions {
val Akka = "2.0.3" val Akka = "2.1.0"
val Jersey = "1.9.1" val Jersey = "1.9.1"
val Jetty = "8.0.4.v20111024" val Jetty = "8.0.4.v20111024"
val Spring = "3.1.0.RELEASE" val Spring = "3.1.0.RELEASE"
Expand All @@ -44,15 +44,15 @@ object Dependencies {
import Versions._ import Versions._


// compile dependencies // 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 jsr311 = "javax.ws.rs" % "jsr311-api" % "1.1.1" % "compile"
lazy val jerseyCore = "com.sun.jersey" % "jersey-core" % Jersey % "compile" lazy val jerseyCore = "com.sun.jersey" % "jersey-core" % Jersey % "compile"
lazy val jerseyJson = "com.sun.jersey" % "jersey-json" % Jersey % "compile" lazy val jerseyJson = "com.sun.jersey" % "jersey-json" % Jersey % "compile"
lazy val jerseyServer = "com.sun.jersey" % "jersey-server" % 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 jerseySpring = "com.sun.jersey.contribs" % "jersey-spring" % Jersey % "compile"
lazy val eventsourced = "org.eligosource" %% "eventsourced" % "0.4.1" % "compile" lazy val eventsourced = "org.eligosource" %% "eventsourced" % "0.5-SNAPSHOT" % "compile"
lazy val scalate = "org.fusesource.scalate" % "scalate-core" % "1.5.2" % "compile" lazy val scalate = "org.fusesource.scalate" %% "scalate-core" % "1.6.1" % "compile"
lazy val scalaStm = "org.scala-tools" %% "scala-stm" % "0.5" % "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 scalaz = "org.scalaz" %% "scalaz-core" % "6.0.4" % "compile"
lazy val springWeb = "org.springframework" % "spring-web" % Spring % "compile" lazy val springWeb = "org.springframework" % "spring-web" % Spring % "compile"


Expand All @@ -65,7 +65,7 @@ object Dependencies {
lazy val configgy = "net.lag" % "configgy" % "2.0.0" % "runtime" lazy val configgy = "net.lag" % "configgy" % "2.0.0" % "runtime"


// test dependencies // 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 { object ExampleBuild extends Build {
Expand Down
2 changes: 1 addition & 1 deletion project/ExamplePlugins.sbt
Original file line number Original file line Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.2.2") addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.4.2")
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Original file line Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.12.0 sbt.version=0.12.2
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package org.eligosource.eventsourced.example
import scalaz.Validation import scalaz.Validation


package object domain { package object domain {
type DomainValidation[A] = Validation[DomainError, A] type DomainValidation[+α] = ({type λ[α]=Validation[DomainError, α]})#λ[α]
type DomainError = List[String] type DomainError = List[String]


object DomainError { object DomainError {
def apply(msg: String): DomainError = List(msg) def apply(msg: String): DomainError = List(msg)
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
*/ */
package org.eligosource.eventsourced.example.server package org.eligosource.eventsourced.example.server


import scala.concurrent.duration._
import scala.concurrent.stm.Ref import scala.concurrent.stm.Ref


import java.io.File import java.io.File


import akka.actor._ import akka.actor._
import akka.util.duration._
import akka.util.Timeout import akka.util.Timeout


import org.eligosource.eventsourced.core._ import org.eligosource.eventsourced.core._
Expand Down Expand Up @@ -56,12 +56,7 @@ object Appserver {


extension.channelOf(DefaultChannelProps(1, paymentGateway).withName("payment")) extension.channelOf(DefaultChannelProps(1, paymentGateway).withName("payment"))
extension.channelOf(DefaultChannelProps(2, multicastProcessor).withName("listeners")) extension.channelOf(DefaultChannelProps(2, multicastProcessor).withName("listeners"))

extension.recover(10 seconds)
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))


val invoiceService = new InvoiceService(invoicesRef, invoiceProcessor) val invoiceService = new InvoiceService(invoicesRef, invoiceProcessor)
val statisticsService = new StatisticsService(statisticsRef) val statisticsService = new StatisticsService(statisticsRef)
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
*/ */
package org.eligosource.eventsourced.example.service package org.eligosource.eventsourced.example.service


import scala.concurrent._
import scala.concurrent.duration._
import scala.concurrent.stm.Ref import scala.concurrent.stm.Ref


import akka.actor._ import akka.actor._
import akka.pattern.ask import akka.pattern.ask
import akka.dispatch._
import akka.util.duration._
import akka.util.Timeout import akka.util.Timeout


import org.eligosource.eventsourced.core._ import org.eligosource.eventsourced.core._
Expand All @@ -30,6 +30,7 @@ import scalaz._
import Scalaz._ import Scalaz._


class InvoiceService(invoicesRef: Ref[Map[String, Invoice]], invoiceProcessor: ActorRef)(implicit system: ActorSystem) { class InvoiceService(invoicesRef: Ref[Map[String, Invoice]], invoiceProcessor: ActorRef)(implicit system: ActorSystem) {
import system.dispatcher


// //
// Consistent reads // Consistent reads
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
*/ */
package org.eligosource.eventsourced.example.service package org.eligosource.eventsourced.example.service


import scala.concurrent.Future

import akka.actor._ import akka.actor._
import akka.dispatch.Future


import org.eligosource.eventsourced.core._ import org.eligosource.eventsourced.core._
import org.eligosource.eventsourced.example.domain._ import org.eligosource.eventsourced.example.domain._
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*/ */
package org.eligosource.eventsourced.example.web package org.eligosource.eventsourced.example.web


import scala.concurrent._
import scala.concurrent.duration._

import javax.annotation.Resource import javax.annotation.Resource
import javax.ws.rs._ import javax.ws.rs._
import javax.ws.rs.core.MediaType._ import javax.ws.rs.core.MediaType._


import akka.dispatch.Await
import akka.util.duration._

import scalaz._ import scalaz._
import Scalaz._ import Scalaz._


Expand Down

0 comments on commit 45b5764

Please sign in to comment.