Questions tagged [remote-actors]
46 questions
12
votes
2 answers
Why are case objects serializable and case classes not?
I am playing with this example http://scala.sygneca.com/code/remoteactors to learn how remote actors work in Scala (2.8.0). In particular I slightly modified how the messages send by the actors are defined as it follows:
sealed trait Event extends…

Mario Fusco
- 13,548
- 3
- 28
- 37
10
votes
2 answers
NoClassDefFoundError when running Scala jar file
I have a small application with RemoteActors, and I want to make a jar file from it. When I try to execute it it gets this exception:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at…

laci37
- 510
- 4
- 17
10
votes
1 answer
What does the remote-actor framework do if trying to write to a client which is no longer there?
I have a server which is using the remote actors framework to communicate with multiple clients. As mentioned in this question, I am having trouble keeping track of when a client disappears. Hence my server is still attempting to send messages to…

oxbow_lakes
- 133,303
- 56
- 317
- 449
8
votes
1 answer
scala class serialization, impossible to fix SerialVersionUID
I'm currently testing remote actors to communicate between Android and Windows. Actors remote sends differents classes where I set the serialVersionUID.
This is the code of my serialized class:
@SerialVersionUID(13.asInstanceOf[Long]) case class…

reevolt
- 797
- 1
- 9
- 24
8
votes
2 answers
How to discover that a Scala remote actor is died?
In Scala, an actor can be notified when another (remote) actor terminates by setting the trapExit flag and invoking the link() method with the second actor as parameter. In this case when the remote actor ends its job by calling exit() the first one…

Mario Fusco
- 13,548
- 3
- 28
- 37
8
votes
1 answer
How send messages to akka system in neighbouring jvm?
I started akka system with HelloActor in one JVM and trying to send messages to it from client in another JVM. And nothing works. How I should do that correctly?
Here is the code:
Simple Server
package akkaSample.severalSystems
import…

Cherry
- 31,309
- 66
- 224
- 364
7
votes
2 answers
Akka remote actors, superclass without default constructor
I am trying to send a message using akka remote actors, where the case class is a subclass of a superclass taking argument in its constructor.
Here is a minimum example to reproduce the problem:
package com.tuvistavie.testremote
import akka.actor.{…

Daniel Perez
- 6,335
- 4
- 24
- 28
7
votes
4 answers
Akka 2.1 minimal remote actor example
EDIT Notice, I needed to make the reverse changes of this https://github.com/akka/akka/commit/ce014ece3568938b2036c4ccfd21b92faba69607#L13L6 to make the accepted answer work with AKKA 2.1 which is the stable distribution found on akkas homepage!
I…

Felix
- 8,385
- 10
- 40
- 59
6
votes
2 answers
From where we get sender actor when a particular message is received?
Whenever an actor receives a message in scala, we can access the sender of the actor by using a keyword 'sender' which is an an object of trait AbstractActor.
My question how is this 'sender' becoming accessible whenever a message is received.?
and…

user1822249
- 727
- 2
- 8
- 12
6
votes
1 answer
How is Scala "filling in" missing arguments to a case class?
When I call:
actor_ ! Exit
How is this being converted into a construction of:
case class Exit(from: AbstractActor, reason: AnyRef)
In particular, how is it that when I call this from a remote (client) actor which has been linked to a remote…

oxbow_lakes
- 133,303
- 56
- 317
- 449
5
votes
1 answer
Why is setting the classloader necessary with Scala RemoteActors?
When using Scala RemoteActors I was getting a ClassNotFoundException that referred to scala.actors.remote.NetKernel. I copied someone else's example and added RemoteActor.classLoader = getClass.getClassLoader to my Actor and now everything works.…

Craig P. Motlin
- 26,452
- 17
- 99
- 126
5
votes
1 answer
Scala Remote Actors - Pitfalls
While writing Scala RemoteActor code, I noticed some pitfalls:
RemoteActor.classLoader = getClass().getClassLoader() has to be set in order to avoid "java.lang.ClassNotFoundException"
link doesn't always work due to "a race condition for which a…

Stefan K.
- 7,701
- 6
- 52
- 64
4
votes
3 answers
How to terminate Scala Remote Actor client?
I'm playing with Remote Actors but I'm facing some difficulties.
Consider this server:
object Server {
def main(args: Array[String]) {
val server = new Server
server.start
}
}
class Server extends Actor {
…

Bruno Reis
- 37,201
- 11
- 119
- 156
4
votes
2 answers
a scala remote actor exception
i with a scala code like this for echo service.
import scala.actors.Actor
import scala.actors.Actor._
import scala.actors.remote.RemoteActor._
class Echo extends Actor {
def act() {
alive(9010)
register('myName, self)
loop…

kula
- 345
- 1
- 8
4
votes
1 answer
Actor Name is not Unique InvalidActorNameException
My environment is eclipse, play, akka, and scala. I am getting an error when trying to create a remote master akka actor.
I am not sure why I am getting this error:
[InvalidActorNameException: actor name hello is not unique!]
When the user submits…

louis1204
- 401
- 1
- 7
- 21