But what is the advantage we are getting by implementing serializable
interface in DotNode Class ? Don't you think that it is something like a bug
? The objective of implementing serializable interface is simply "to
facilitate the serialization" but due to this very problem user can't able
to serialize that so i am not getting the point why it is implementing this
interface ?

Thanks,
Ganesh
---------- Forwarded message ----------
From: Joshua Davis (yahoo) <pgm...@yahoo.com>
Date: Mon, Dec 7, 2009 at 11:19 PM
Subject: Re: [Hibernate] org.hibernate.hql.ast.tree.DotNode Implements
Serializable but we can't serialize it
To: Ganesh Kumar Choudhary <ganesh.gu...@gmail.com>


Why do you need to serialized the parse trees?  It would be better to
re-parse the string in order to get all the other non serializable
references anyhow.

Sent frome my iPhone

On Dec 7, 2009, at 12:36 PM, Ganesh Kumar Choudhary <ganesh.gu...@gmail.com>
wrote:

org.hibernate.hql.ast.tree.DotNode Implements Serializable interface but
when i am trying to serialize it i am getting some exception that

           java.io.NotSerializableException:
org.hibernate.hql.ast.HqlSqlWalker

On debugging i found that DotNode class has the reference of HqlSqlWalker
class and this class doesn't implement serializable interface.So the program
is throwing this exception. I think either the reference of HqlSqlWalker
should be declared as transient, or the HqlSqlWalker class itself should
also implement serializable interface to get the benefit of implementing
serializable interface by DotNode Class. Otherwise it is not worth to
implement serializable interface by DotNode class because ultimately we are
not able to serialize it in the current form .

Is it a bug or something else ??

Thanks,
Ganesh




-- 
Man cannot discover new oceans unless he has the courage to lose sight of
the shore.



-- 
Man cannot discover new oceans unless he has the courage to lose sight of
the shore.

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev

_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel




-- 
Man cannot discover new oceans unless he has the courage to lose sight of
the shore.
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to