These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Is Serializable POJO Necessary?
PostPosted: Fri Mar 30, 2007 5:56 pm 
Newbie

Joined: Thu Mar 08, 2007 12:59 pm
Posts: 9
All Veterans,

I am kind of new and don't completely understand how Serializable POJO is benefitable from Hibernate if there is any.

If each id field is already Serializable data type such as Long, then making entire POJO Serializable really necessary?

Would anyone can explain how this(Serializable or not) make different in real simple words?

I am trying to figure out which POJOs has to be Serializable.

Java Baby.


Top
 Profile  
 
 Post subject: To save or marshall the whole object
PostPosted: Tue Apr 03, 2007 9:24 am 
Beginner
Beginner

Joined: Thu Dec 09, 2004 7:04 pm
Posts: 26
Location: Denver, CO
Hibernate does not require that the object be serializable. In practice; however, most people do make their POJO's serializable for the following reasons:
    It allows the object to be passed to an EJB.
    It allows the object to be stored in a servlet session.
    It may be required for some implementations of clustering and/or caching.


In general, it does not hurt and it usually helps.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.