Java RMI is powerful middleware that replaces raw request/reply method as UDP and TCP. The core technology to make it works is Stub and Skeleton function. Stub is located on the client side while Skeleton is located on server side. The role of stub and skeleton is to do marshalling and unmarshalling meaning that it will squash the argument and return value of a method to be a standard format for storing in a file or transferring over the network. Without Stub and Skeleton, java RMI cannot work.
Note on Stub and Skel files (Skeleton)
- Java JDK 1.6 does not require to have Stub and Skeleton file (Skel for short) as it takes advantage of reflection to accomplish the task
- Java JDK 1.5, it requires only Stub file at the client. To generate stub file:
PowerServer_Stub.classwill be generated
- Java JDK prior to 1.4 (not quite sure), it requires both Stub and Skel files
rmic -vcompat PowerServer
PowerServer_Skel.classwill be generated