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