• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Collections which are serializable

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the quick response. Appreciate it.
- walk rustin
SCBCD
 
reply
    Bookmark Topic Watch Topic
  • New Topic