I am trying to develop an application that uses a thin client methodology using RMI. What I mean by thin client is that there will only be several classes to start the client side application and invoke the rmi server. The rmi server will return the class files (mainly Swing/Charva JFrame and JPanel classess, which I refer to as the UI classes), which will be instantiated and referenced by an interface that all the classes implement. Many of the UI classes also instantiate classes for control and presentation (i.e. extended JText Field and other java classes). It seems that because RMI uses the URLClassLoader, the class types do not have to reside on the client side on disk. I believe this is because RMI automatically loads both the classes that were requested by the client and any additional classes that are referenced by the requested classes. My first question is:
1. Are the referenced classes loaded at the same time the called class is loaded, or when the called class is instantiated?
2. We store the rmi requested .class files in a hash table the first time they are requested. We do this so we d onot need to go accross the network the next time we need to reference and instanitiate the class, we just get if from the hash table. My question is, if we instantiate the class file from the hash table, does RMI reload the referenced class files (the classes the instantiated within the object I am instantiating, i.e Extended JText and UI Controller classes) from the RMI server or are the loaded from memory on the client side?