By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,806 Members | 1,380 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,806 IT Pros & Developers. It's quick & easy.

what is the difference between serialized bean and a non serialized bean?

P: 28
I have gone through the concept of serialization in java very recently, i understood what serialization means in java,

but why serialization is required in beans?

as i have done some research on net, i found that persistence can be achieved, i did not not understand how persistence can be achieved by using serialization.

can some one please shed some light on this?
with an example is really appreciated

Thanks a lot in advance
Sep 7 '12 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 5K+
P: 5,397
I think you need to start with the basics again.

The answer really, truely, is there...

Sep 10 '12 #2

P: 1
serializable interface is called as marker interface or null interface or singling interface.
what does, the system looks if the class implements the interface, it behaves in one way, if the class does not implement the interface it behaves in other way means the object of this class needs to be treated differently.

by default system does not like making backup of the object, it takes time.
if you want the system to take backup of your object, system tells then you better implement the interface Serializable.

Example:-Serializable, Remote, Cloneable.
An object state can be saved by serializing an object.
To serialize an object we need an object output stream.
Serialization of an object means writing the value of its all data fields into a stream of bytes.
A class can be de-serialized by using object input stream.
Serialization is the process of writing the current state of an object to a stream. To serialize an object the class must implement either or
Sep 13 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.