Solved

java bean serializable interface

Posted on 2014-01-10
3
1,135 Views
Last Modified: 2014-01-28
Hi,

I am going through below link
http://www.avajava.com/tutorials/lessons/what-is-a-javabean.html

I wonder why java bean needs to implement the serializable interface.

Are there are scenarios where there is no need for java bean to save object to Database or file system so that we do not need to implement serializable interface.(any sample example for that scenario).

In this link they said 'Refrigerator'. I did not get in what context author mentioned that.

please advise
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
  • 2
3 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 39773627
You do not need to implement the Serializable interface, unless you need to serialise the data, i.e. you need to pass the bean remotely to another JVM or you need to save its state on the disk.
0
 
LVL 7

Author Comment

by:gudii9
ID: 39784046
you need to pass the bean remotely to another JVM or you need to save its state on the disk. 

Open in new window


Are these two scenarios for 'no need to serialize data' ?
why do we need to pass bean remotely to another JVM
I am not very clear. Please advise
0
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
ID: 39789386
Are these two scenarios for 'no need to serialize data' ?

No, they are the scenarios for "I need to serialise data".

why do we need to pass bean remotely to another JVM

If you are making a remote method call for example. If someone has implemented a remote application and you need access to it. There are several scenarios where this could be useful.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This video teaches viewers about errors in exception handling.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now