This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java beans and Serialization  RSS feed

 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is it required that java bean used in a JSP implement Serializable interface.
No is my answer
http://www.onjava.com/pub/a/onjava/2003/06/11/jsp_progressbars.html
But the above link has this sentence under the Simulating a Heavy Task section-
The TaskBean class also implements the java.io.Serializable interface so that it can be used as a JavaBean in the JSP pages

I feel that the sentence is misleading.
What do you guys feel.
bye
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't HAVE TO but under heavy load, low memory conditions your servlet engine will try to save a session by serialization, losing any non-serializable beans. This will result in mysterious malfunctions that you will never see in low load testing.
Bill
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess this(Saving a bean under heavy load) is not a part of spec.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!