Solved

java bean serializable interface

Posted on 2014-01-10
3
1,149 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
reasons why a "inside Menu" would not appear for a web server 6 55
Groovy:unable to resolve class error 2 65
print map entry 34 53
Apps blocked by Java 9 55
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

939 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

10 Experts available now in Live!

Get 1:1 Help Now