The Artima Developer Community
Sponsored Link

Java Answers Forum
RMI Classloading and referenced classes

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Elliott Gonshor

Posts: 1
Nickname: rurecruit
Registered: Mar, 2002

RMI Classloading and referenced classes Posted: Mar 20, 2002 8:22 AM
Reply to this message Reply
Advertisement
Hi All,

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?

ANy responses are greatly appreciated.


Elliott Gonshor QuestDiagnostics

Topic: Creating a server - side program? Previous Topic   Next Topic Topic: Passing data in a program with GUI, HOW ?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use