aspose file tools*
The moose likes Distributed Java and the fly likes Basic Question on Skeletons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Basic Question on Skeletons" Watch "Basic Question on Skeletons" New topic
Author

Basic Question on Skeletons

Manjunath Subramanian
Ranch Hand

Joined: Jul 18, 2001
Posts: 236
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

Joined: Oct 25, 2000
Posts: 7292

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.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Manjunath Subramanian
Ranch Hand

Joined: Jul 18, 2001
Posts: 236
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

Joined: Oct 25, 2000
Posts: 7292

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

Joined: Jul 18, 2001
Posts: 236
That was indeed very helpfull..
Thanks,
Manjunath
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Basic Question on Skeletons