I'm going through HeadFirst EJBs, where in the chapter "EJB Architecture " they explain for a question like this.
Q: If we have to pass HashMap to the remote object?
A: Collections is serializable. So no need to worry as long as the things you put in collection are serializable.
Fine, I got this. But i did not understand following paragraph.
There is one place Things can fail. That is when you call values() method on hashmap or hashtable, we will get collection of just the values without keys. We can't say whether the collection returned is serializable or not. So put things into something you trust to be serializable like ArrayList.