Description |
I'm trying to use hessian serialization for a home project I'm developing, I found it very interesting, but I'm having a strange behavior that I don't know if it's intended, at least I found it strange...
The scenario is: I've coded custom serializer and deserializer for the class java.util.Date, registered them in the serializer factory, that part is working, and if I do a remote call on a method that takes a Date as parameter, or returns a Date, it works fine and uses my custom serializer and deserializer.
However, if I call a method that takes a parameter of type "MyDateWrapper", which as a field of type java.util.Date, I get an error. When doing some debug I noticed that the serialization is not done with my custom serializer, it is done with "DateFieldSerializer", but on the remote side, the deserialization is done with my custom deserializer, so I get an error, because the serialization is not compatible with the deserialization. Why is serialization using "FieldSerializer", ignoring serializer factory, and deserialization is getting the deserializer from the serializer factory? Shouldn’t it be "symmetric"?
I am using version 4.0.51 of hessian.jar. |