Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Serializing actor behavior in Akka 1.3
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Samira Tasharofi  
View profile  
 More options May 13 2012, 3:12 pm
From: Samira Tasharofi <samira.tashar...@gmail.com>
Date: Sun, 13 May 2012 12:12:26 -0700 (PDT)
Local: Sun, May 13 2012 3:12 pm
Subject: Serializing actor behavior in Akka 1.3
Hi all,

In Akka 1.3, I have a class named "CustomeActorRef" that extends
"ActorRef" and I use a factory to create an instance of
CustomeActorRef instead of ActorRef.

Inside CustomeActorRef, I override the method "invoke" to serialize
the actor behavior by the following code:

override def invoke(messageHandle: MessageInvocation): Unit = {
   super.invoke(messageHandle)
   if (this.hotswap.nonEmpty) {
           var beh = this.hotswap.head
            var stream = new java.io.ObjectOutputStream(new
java.io.FileOutputStream("behavior"))
            stream.writeObject(beh)
     }

}

But upon calling "writeObject" I am getting exception. Do you know how
I can serialize the actor behavior?

Thanks,
Samira


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonas Boner  
View profile  
 More options May 15 2012, 10:00 am
From: Jonas Boner <jo...@jonasboner.com>
Date: Tue, 15 May 2012 16:00:10 +0200
Local: Tues, May 15 2012 10:00 am
Subject: Re: [akka-user] Serializing actor behavior in Akka 1.3
It depends on what the PartialFunction closes over. Impossible to
answer or implement generically.

On Sun, May 13, 2012 at 9:12 PM, Samira Tasharofi

--
Jonas Bonér
CTO
Typesafe - The software stack for applications that scale
Phone: +46 733 777 123
Twitter: @jboner

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Samira Tasharofi  
View profile  
 More options May 15 2012, 3:05 pm
From: Samira Tasharofi <samira.tashar...@gmail.com>
Date: Tue, 15 May 2012 12:05:10 -0700 (PDT)
Local: Tues, May 15 2012 3:05 pm
Subject: Re: Serializing actor behavior in Akka 1.3
Jonas,
My problem is solved. I needed to make the Actor class Serializable.
Thanks a lot for your reply.

Regards,
Samira

On May 15, 9:00 am, Jonas Boner <jo...@jonasboner.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »