Hi kraythe,

I think the simplest solution to serialize/deserialize ActorRef is: 
Serialization.serializedActorPath(theActorRef) / extendedSystem.provider().
resolveActorRef(identifier)
as described here: 
http://doc.akka.io/docs/akka/snapshot/java/serialization.html#Serializing_ActorRefs

On Saturday, August 1, 2015 at 11:55:41 PM UTC+2, kraythe wrote:
>
> I am storing ActorRefs for a cluster in a hazelcast map. I thought that 
> since the ActorRef is serializable I should easily be able to serialize it 
> and deserialize it to call it across nodes. One node finds the data is on 
> another partition so gets the router from that partition and forwards the 
> message to that router. I am getting the following error: 
>
> play.api.Application$$anon$1: Execution 
> exception[[HazelcastSerializationException: 
> java.lang.IllegalStateException: Trying to deserialize a serialized 
> ActorRef without an ActorSystem in scope. Use 
> 'akka.serialization.Serialization.currentSystem.withValue(system)
>
>
> Now I could write a custom deserializer to do this but I am wondering if 
> there is an easier way like storing "toStringWithAddress" and then 
> rebuilding the actor ref on the other side. 
>
>
> What is the recommended way to serialize, send an actor ref to another 
> node, and then deserialize it? 
>
>
> Thanks in advance. 
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to