• Post Reply Bookmark Topic Watch Topic
  • New Topic

Making classes Serializable

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When do you decide whether to make a class implement Serializable ?
As far as my experience goes, anything that needs to be stored in JNDI,
classes that may be transmitted over RMI and also those that are persisted
via Java serialization should implement Serializable.

I have many supporting utility classes in my EJB tier e.g. singletons, class wrappers, value objects etc... Do I make them Serializable and if yes, what's the rationale ?

Regards,

Pho
 
Amit Jaipaul
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Value Objects need to be serializable, otherwise how do we pass them on to the client thro network? Because we can write only serializable objects to the stream.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!