... did you see the workaraound ? 
in the workaround class, the deserialized date is correct ! ?


Mit freundlichen Grüssen | Best Regards

Ing. Thomas Margreiter
Abteilungsleiter EDV, Head of IT-Department FELDER-GRUPPE
KR-Felder-Strasse 1 | A-6060 HALL in Tirol
Tel. +43 (0)5223 5850 401 | Fax +43 (0)5223 585066 401
t...@felder.at | www.felder-group.com 



From:   Scott Ferguson <f...@caucho.com>
To:     Discussion of the Hessian protocol <hessian-interest@caucho.com>
Date:   30.11.2010 18:23
Subject:        Re: [Hessian-interest] Hessian 4.07 bug with serializing 
java.util.Date
Sent by:        hessian-interest-boun...@caucho.com



Thomas Margreiter wrote:
> i just have tried the use of hessian 4.07   for our java RIA client.
> it works very good, but there is one problem with serializing classes 
> extending the java.util.date ... see the class below ... when this 
> class is serialized and deserialized, the deserialized date is allways 
> '1970-01-01 00:00:00.000'
>
> *public* *class* FerpsTimestamp extends java.util.Date *implements* 
> java.io.Serializable{
> 
>         public String testmsg(){
>                 return "Hallo";
>         }
> }

Hmm. I'm not exactly sure this is a bug.

Since Hessian is a cross-language protocol, it needs to have a 
consistent date representation that will work for all languages. In 
other words, it can't just serialize the Java fields for java.util.Date, 
but needs to turn that date into a Hessian primitive bytecode.

That does mean that a class extending java.util.Date is a problem 
because there's no natural Hessian representation for that object.

-- Scott
>
> the workaraound for this, would be to  set the date as a field !
>
> *public* *class* FerpsTimestamp *implements* java.io.Serializable{
>         private Date correctDate=new Date(); 
>
>         public String testmsg(){
>                 return "Hallo";
>         }
> }
>
>
>
> Mit freundlichen Grüssen | Best Regards
>
> Ing. Thomas Margreiter
> Abteilungsleiter EDV, Head of IT-Department FELDER-GRUPPE
> KR-Felder-Strasse 1 | A-6060 HALL in Tirol
> Tel. +43 (0)5223 5850 401 | Fax +43 (0)5223 585066 401
> t...@felder.at | _www.felder-group.com_ 
> <
file:///private/var/folders/r0/r0RV9mULEDCiONlsFH6nl++++TI/TemporaryItems/www.felder-group.com
> 
>
>
>
>
> /
>
> Diese Nachricht und allfällige angehängte Dokumente sind vertraulich 
> und nur für den/die Adressaten bestimmt. Sollten Sie nicht der 
> beabsichtigte Adressat sein, ist jede Offenlegung, Weiterleitung oder 
> sonstige Verwendung dieser Information nicht gestattet. In diesem Fall 
> bitten wir, den Absender zu verständigen und die Information zu 
> vernichten. Für Viren, Übermittlungsfehler oder sonstige Irrtümer bei 
> Übermittlung besteht keine Haftung. /
>
>
>
> /
>
> This message and any attached files are confidential and intended 
> solely for the addressee(s). Any publication, transmission or other 
> use of the information by a person or entity other than the intended 
> addressee is prohibited. If you receive this in error please contact 
> the sender and delete the material. The sender does not accept 
> liability for any errors or omissions as a result of the transmission 
> or viruses./
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> hessian-interest mailing list
> hessian-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/hessian-interest
> 



_______________________________________________
hessian-interest mailing list
hessian-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/hessian-interest










Diese Nachricht und allfällige angehängte Dokumente sind vertraulich und 
nur für den/die Adressaten bestimmt. Sollten Sie nicht der beabsichtigte 
Adressat sein, ist jede Offenlegung, Weiterleitung oder sonstige 
Verwendung dieser Information nicht gestattet. In diesem Fall bitten wir, 
den Absender zu verständigen und die Information zu vernichten. Für Viren, 
Übermittlungsfehler oder sonstige Irrtümer bei Übermittlung besteht keine 
Haftung. 





This message and any attached files are confidential and intended solely 
for the addressee(s). Any publication, transmission or other use of the 
information by a person or entity other than the intended addressee is 
prohibited. If you receive this in error please contact the sender and 
delete the material. The sender does not accept liability for any errors 
or omissions as a result of the transmission or viruses.


_______________________________________________
hessian-interest mailing list
hessian-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Reply via email to