Solved

Serialization and Vetor

Posted on 2006-07-17
7
215 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

739 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