• Post Reply Bookmark Topic Watch Topic
  • New Topic

Are collections Serializable Objects

 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In the remote method invocation as we have to pass the objects as a serializable object, what will happen if I pass a serializable hashmap object of customer objects as an argument. (Customer is NOT implemented the serializable interface). In the Head First EJB book it has mentioned that if use the values method() while will return only values, so skeleton side cannot able to identify the object as it not serialized. Can anyone please clarify my doubt?

I think , if I am not wrong Serializable is to recreate the state of object in another jvm with the use of object byte formats. HashMap object is by default implements serialable means, we can able to recreate the HashMap objects in the remote location, but why is it so that if you use values method of HashMap can not able to identify the customer object as the customer object was not serialzed.



Regards,
M.S.Raman
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Customer should implement Serializable interface.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!