Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collections which are serializable

 
Walker Rustin
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In stateful session beans we are not allowed to use collections which are not serializable. I tested that by using HashTable and it indeed fails. My question is: what should I use in case I need to have a collection class.
thanks.
- walk rustin
 
Sany Bel
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HashTable itself is serializable. You have to make sure what you put in HashTable is serializable. Also, you should not use the collection than is returned by values() method, because what you get is something that implements Collection, but you do not know if that is serializable. Look at page 72 of HFEJB for more details.
 
Walker Rustin
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick response. Appreciate it.
- walk rustin
SCBCD
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic