Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Basic Question on Skeletons

 
Manjunath Subramanian
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I understand that from jdk1.3 onwards you don't need a skeleton.Is that right?
If so,then who does the marshalling and unmarshalling on the server side?
Thanks in advnace,
Manjunath
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manjunath -
Starting with JDK 1.2.x, the rmic compiler has the option of creating skeletons (in order to work with JDK 1.1.x RMI code) or not. The skeleton-less approach is not backwards compatible, so one must choose which way to go.
Starting with JDK 1.2, the skeleton is removed because it's properties can be constructed dynamically using the Reflection facility. (Un)marshalling is done the same way, it's just built in now, so the developer doesn't have to handle skeleton code.
 
Manjunath Subramanian
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Michael for the reply.
But i am not very clear on what you have said.
Can you elaborate on these points a bit more?
Thanks once again,
Manjunath
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, but first let me start over:
Originally posted by Manjunath Subramanian:
Hello All,
I understand that from jdk1.3 onwards you don't need a skeleton.Is that right?
If so,then who does the marshalling and unmarshalling on the server side?

The answers are "no" and "a skeleton."
You do need a skeleton, or rather your RMI system does; the programmer is simply not responsible for it, starting with JDK 1.2. Instead, the server-side of an RMI system generates the skeleton dynamically by reading the internals server object in runtime. An API known as the Reflection facility makes this possible; you can look over the current version of java.lang.Class and the contents of the java.lang.reflect package to see all the class components that represent this facility.
You can still generate the skeleton code if you want to; there's no reason why you shouldn't, other than convenience. And for people who have been using RMI since JDK 1.1, manually created skeletons are still required.
The program that generates the RMI components, i.e., the skeletons for the server side and the stubs for the client side, is called rmic. It operates on a class that has implemented both the Remote interface and a service interface. You can see the JDK documentation for more details.
Is this more helpful?
 
Manjunath Subramanian
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was indeed very helpfull..
Thanks,
Manjunath
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic