diff --git a/akka-core/pom.xml b/akka-core/pom.xml index 39d56e2d61..12a4e95e36 100644 --- a/akka-core/pom.xml +++ b/akka-core/pom.xml @@ -32,6 +32,16 @@ scala-library ${scala.version} + + org.codehaus.aspectwerkz + aspectwerkz-nodeps-jdk5 + 2.1 + + + org.codehaus.aspectwerkz + aspectwerkz-jdk5 + 2.1 + org.jboss.netty netty diff --git a/akka-core/src/main/scala/actor/Actor.scala b/akka-core/src/main/scala/actor/Actor.scala index 5cbe7688cd..3bf6ee12dd 100644 --- a/akka-core/src/main/scala/actor/Actor.scala +++ b/akka-core/src/main/scala/actor/Actor.scala @@ -171,33 +171,6 @@ object Actor extends Logging { def receive = body } - /** - * Use to create an anonymous event-driven actor with both an init block and a message loop block - * as well as a life-cycle configuration. - * The actor is started when created. - * Example: - *
-   * import Actor._
-   *
-   * val a = actor(LifeCycle(Temporary))  {
-   *   ... // init stuff
-   * } receive  {
-   *   case msg => ... // handle message
-   * }
-   * 
- */ - def actor[A](lifeCycleConfig: LifeCycle)(body: => Unit) = { - def handler[A](body: Unit) = new { - def receive(handler: PartialFunction[Any, Unit]) = new Actor() { - lifeCycle = Some(lifeCycleConfig) - start - body - def receive = handler - } - } - handler(body) - } - /** * Use to create an anonymous event-driven remote actor. * The actor is started when created. @@ -216,6 +189,10 @@ object Actor extends Logging { def receive = body } + val a = actor(LifeCycle(Temporary)) { + case "test" => println("received test") + case _ => println("received unknown message") + } } /**