Solved

Serialization and Vetor

Posted on 2006-07-17
7
213 Views
Last Modified: 2010-03-31
Hi All,

As we aware that Vector and ArrayList are serialized, should my business objects, which are going to be placed in the ArrayList, which will be passed to EJB methods be serialized?

What my doubt is since the ArrayList is serailized, is it necessary that the business objects which the ArrayList holds should be serialized?

Thanx.
0
Comment
Question by:hemanexp
7 Comments
 
LVL 4

Accepted Solution

by:
Meritor earned 64 total points
ID: 17122470
Yes, All your business objects must be serialized in an ArrayList.
0
 
LVL 4

Expert Comment

by:Meritor
ID: 17122502
because while ArrayList is being serialized, all objects in arraylist are being serialized by JVM.
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 62 total points
ID: 17122671
>>is it necessary that the business objects which the ArrayList holds should be serialized?

They will be serialized if they are Serializable and all the objects they contain are Serializable
0
 
LVL 23

Assisted Solution

by:Ajay-Singh
Ajay-Singh earned 62 total points
ID: 17123156
All the elements of the ArrayList would be serialized. The serilization would throw error if one/more elements doesn't follow Serializable interface.
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 62 total points
ID: 17129845
yes, it is nested. All data members of the business objects should also be serialized and so on & so forth.
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

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…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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…

770 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