• Post Reply Bookmark Topic Watch Topic
  • New Topic

Remote methods: Type of parameters and return values

 
Emilie Dupond
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I had the following remote method signature :

How do I assure a proper *call to* and *return from* the former remote method ? I believe that "Hashtable"s are Serializable. Do I have to make "MyClass" extend/implement the Serializable interface to accomplish a sucessful call and return ?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every Java object moved from one place to another by RMI must be Serializable.
You can verify that Hashtable implements Serializable by looking at the JavaDocs. Naturally all objects linked to by the Hashtable must also be Serializable or you will get a runtime exception.
Bill
 
Emilie Dupond
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, thank you.
I figured out that, not only did "Hashtable" and "MyClass" have to be serializable, but also, all the classes that "MyClass" depended on.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!