Well, I'm new to GWT serializing, and I don't have lots of experience
with Java or other serialization but to be honest serialization has
always seemed very simple to me. I do not understand why Pair can't be
transient and why that would not tell the GWT compiler to ignore it
when serializing. Is it the case that types inside packages outside of
your client, shared, or server packages aren't seen by the GWT
compiler? If so, I would hazard a guess that the class using said
external type (Pair) would cause a GWT compiling error. It wouldn't
know what to do with members of said external type (Pair). But I
suspect the GWT compiler should be able to see an externally declared
type because it is imported into the class that uses it.

I do believe it is the case that type (class) members (methods and
variables) that are unused on the client are indeed stripped out of
the GWT compiled version of a class. Is this what you mean by GWT not
"seeing" a type? In this situation a type may very well not be
compiled into javascript, but I would still think that making Pair
transient would have to solve the problem.

All that said, I am obviously not of any help, but I am interested and
want to understand more. I am interested in understanding both the
problem as well as whatever solution is eventually discovered.

On May 24, 1:01 pm, "Robert J. Carr" <[email protected]> wrote:
> Hi Gursel-
>
> Thanks for the response, but I don't *want* Pair to serialize.  And
> just marking it as transient doesn't fix the problem.  The Pair class
> is out of the gwt package, and therefore, the gwt compiler can't even
> see it.
>
> Sorry if this doesn't make sense.
>
> On Mon, May 24, 2010 at 5:45 AM, Gursel Koca <[email protected]> wrote:
>
> > gwt.example.util.Pair p should be transient.. GWT serialization is
> > similar to Java serialization. Gwt serializer try to serialize every
> > non transient , final fields.
>
> > --
> > 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 
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> 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 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
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