Right you are!  My value class needed to be marked as Serializable, then it 
worked fine.
Value classes are really weird things in Scala.  Sometimes the compiler 
simply replaces them with the types they wrap, Long in this case.
Other times an object is generated.  Apparently the upSince field simply 
got compiled as a Long, hence no problem, while the PosixDate in the Map 
was resolved to a class--one not serializable so it was not making the trip 
over the wire.  Marked it as Serializable and everything worked.

Greg

On Thursday, February 13, 2014 4:37:24 PM UTC-6, √ wrote:
>
> You probably need to investigate your serializer.
>
>
> On Thu, Feb 13, 2014 at 9:00 PM, tigerfoot <gzo...@gmail.com <javascript:>
> > wrote:
>
>> Hello,
>>
>> Are there any limitations on passing value classes in Akka?
>>
>> I have this class:
>>
>> case class ServerStats (
>> httpUrl          : String,
>> instanceName     : String,
>>  envName          : String,
>> version          : String,
>> configHits       : Long,
>>  upSince          : PosixDate,
>> // events           : Map[String, Map[String,PosixDate]]  // Event name 
>> -> Map[Brand->PosixDate]
>>  events           : Map[String, Map[String,Long]]  // Event name -> 
>> Map[Brand->PosixDate]
>> )
>>
>> Note the events item.  PosixDate is a value class that "wraps" Long.  The 
>> 'Long' version works fine.  I can bundle one of these and pass it over the 
>> wire 
>> to a remote/clustered actor.  The PosixDate version doesn't appear to 
>> blow up (at least I'm not seeing errors), but it doesn't show up on the 
>> receiving 
>> side of the communication.
>>
>> Was just wondering if there was an obvious reason this wouldn't work. 
>>  Interestingly the simple non-Map PosixDate field passes just fine.
>>
>> Greg
>>
>> -- 
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: http://akka.io/faq/
>> >>>>>>>>>> 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 akka-user+...@googlegroups.com <javascript:>.
>> To post to this group, send email to akka...@googlegroups.com<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Cheers,
> √
>
> * ——————— **Viktor Klang*
> *Chief Architect - **Typesafe <http://www.typesafe.com/>*
>
>  Twitter: @viktorklang
>  

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to