Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Remote methods: Type of parameters and return values

 
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 ?
 
Author and all-around good cowpoke
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.
 
    Bookmark Topic Watch Topic
  • New Topic