This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I need more detais with a scanario and underlying mechanism to understand this concept. If I am sending a query, then it goes through HTML page, at the other end it is received by servlet, servlet transfers the query to database thr JDBC and the result is displayed by JSP. Where does Serialization come in picture in the process ?
Personally, I've never found a need to use serialization directly in my 10 years of Java programming. But I have used technologies that use it under the covers. For example, when using RMI, serialization is used to send data over the network. Or when replicating a servlet session across a cluster, the objects in the session are serialized.
you can write code so that when your process shuts down, it serializes some objects, and saves them to your disk drive. then, a day, a week, a year later, you restart your process. you read the file, and can re-create the objects and have them be in the same state as before you shut down.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors