• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Type of objects that can be sent in RMI

 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello sir, madam and my dear friends
I read in book that if you want to send any objects from client to server in RMI then they must satisfy the following conditions
1. It must be a serializable object
2. It must be either a primitive type
3. Array or collection of primitive type or serializable object
4. Remote Object

I have doubt regarding Remote object. As per the book they say that when you pass a remote object to a remote method then java actually sends remote object stub.
Now my question is what is the use of stub at server side. My understanding is that java sends remote stub by serializing it.

Please correct me if I am wrong.
Waiting for your replies.

Thanks and Regards
Rohit.
 
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes it's a bit confusing.

A common use of passing a remote object is for client callback. There is a tutorial at Sun on using callback. You should read that for an understanding of remote object passing.

The client passes a remote object of itself to the server. The server uses that remote object to call the client. That's why it is said to be the stub, so the receiver can call methods on that remote object.
reply
    Bookmark Topic Watch Topic
  • New Topic