Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Collection findXXX()  RSS feed

 
S Manch
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...

most of the findXXX(finder) methods return a java.util.Collection by default!, but I saw that the java.util.Collection is a non-serializable interface(all classes in EJB should be serializable because they travel through the pipe!)....hmm..confused..any explanations?

sanjay.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interfaces aren't serializable. There's nothing to serialize. Classes, i.e. implementations of those interfaces may be serializable. If you look at the collection implementations in java.util.*, for example, you'll see that they are all Serializable.

- Peter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!