I've read through the Serialization guide but I'm still struggling
with a particular issue.

We are using GWT as a front end to manage an application using
Gigaspaces.  One design decision that was made early was to provide a
HashMap<String, Object> in the POJO transfer object so we could make
changes to the POJO w/o causing a side effect to the JavaSpace.  The
way we do this is:

class MyEntity{
   Map<String, Object> properties = new HashMap<String, Object>();

   public float getRank()
   {
      Float f = (Float) properties.get("rank");
      return ( f == null ? 1.0f : f.floatValue );
   }

   public void setRank(float f)
   {
        ...
         properties.put("rank", f );
   }
}

I understand that Object is not Serializable but float is.  The error
that essentially comes from GWT on our call to
RPC.encodeResponseForSuccess is the following:

com.google.gwt.user.client.rpc.SerializationException: Type
'java.lang.Float' was not included in the set of types which can be
serialized by this SerializationPolicy or its Class object could not
be loaded. For security purposes, this type will not be serialized.


It appears that GWT knows the Object is of type Float.  Can anyone
tell me if it's possible to use GWT in this way or am I going about it
all wrong. Setting the HashMap to have String, Float isn't an option b/
c the value can be any type of Serializable Object.  It has to be
Serializable or else the JavaSpace wouldn't allow us to pass the data
across the space so there are checks else where.

Thanks for any help.

-Ryan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to