Skip to content

Fixing issues #2 and #3 in the Actors Migration. #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 13, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions overviews/core/_posts/2012-11-08-actors-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ label-text: New in 2.10

## Introduction

Starting with Scala 2.10.1, the Scala
Starting with Scala 2.11.0, the Scala
[Actors](http://docs.scala-lang.org/overviews/core/actors.html)
library is deprecated. Already in Scala 2.10.0 the default actor library is
[Akka](http://akka.io).
Expand Down Expand Up @@ -518,14 +518,15 @@ In Akka, watching the already dead actor will result in sending the `Terminated`
### Step 5 - Moving to the Akka Back-end

At this point user code is ready to operate on Akka actors. Now we can switch the actors library from Scala to
Akka actors. In order to do this configure the build to exclude the `scala-actors.jar` and the `scala-actors-migration.jar`
and add the *akka-actor.jar*. The AMK is built to work only with Akka actors version 2.1 which are included in the [Scala distribution](http://www.scala-lang.org/downloads)
Akka actors. To do this configure the build to exclude the `scala-actors.jar` and the `scala-actors-migration.jar`,
and to include *akka-actor.jar* and *typesafe-config.jar*. The AMK is built to work only with Akka actors version 2.1 which are included in the [Scala distribution](http://www.scala-lang.org/downloads)
and can be configured by these [instructions](http://doc.akka.io/docs/akka/2.1.0/intro/getting-started.html#Using_a_build_tool).

After this change the compilation will fail due to different package names and slight differences in the API. We will have to change each imported actor
from scala to Akka. Following is the non-exhaustive list of package names that need to be changed:

scala.actors._ -> akka.actor._
scala.actors.migration.ActWithStash -> akka.actor.ActorDSL._
scala.actors.migration.pattern.ask -> akka.pattern.ask
scala.actors.migration.Timeout -> akka.util.Timeout

Expand Down