File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

adv of searializing java beans

 
nancy andrew
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do we generally searialize our java beans (POJO) when it is not shared across the appplication, when we are not passing over the n/w, no input output operations. If only purpose of beans is to save the state of object, why cant we save it in underlying db. Kindly explain
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Who says we do?
 
nancy andrew
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you mean to say, it is not nessesary to serialize java been if we dont need the above mentioned. Another question, in hibernate is it nessesary to serialize the table mapping beans?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By "serialize" do you mean "implements Serializeable"? Because "serializing" is the actual *act* of writing the object. "To serialize" means to write the object.

Re: Hibernate:

http://docs.jboss.org/hibernate/stable/core/reference/en/html/tutorial.html#tutorial-firstapp-firstclass
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(Although objects stored in the session may be serialized depending on the session mechanism, how the container is set up to handle restarts, etc.)
 
Rob Spoor
Sheriff
Pie
Posts: 20393
47
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nancy andrew wrote:n/w

Please UseRealWords. I first read that as "north-west" instead of "network". And the "adv" should also be "advantage(s)".
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic