This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI - Dynamic class loading

 
Pratibha Srinivasan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have almost completed the assignment and was trying to include dynamic class loading and have some queries on this.
1> I am using file:/<URL> to specify the codebase. When both client and server run on the same machine, the stub download works correctly. For the same to work on different machines do I have to use http://<URL>?
2> Also wanted to know from the grading perspective if its OK to avoid dynamic downloading and package the stub with the client.
3> I have included a "grant all" policy on both server and client and want to retain this even if I remove dynamic stub loading. Want to do this to override default system security policy. Is that OK?
4> One last question - On the client side I need to use DataInfo class. This class is Serializable. However, it is not getting downloaded dynamically when file:/<URL> is used. Do I need to do anything else to download classes which are not stubs?
Thanks for your patience!
Regards,
Pratibha
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pratibha
For [stub downloading] to work on different machines do I have to use http://<URL>?

For stub downloading to work over a network you have to use either the http or ftp protocols.
Also wanted to know from the grading perspective if its OK to avoid dynamic downloading and package the stub with the client.

Not only is it OK - it is desirable.
One of the requirements of the new exam is: "You must not require the use of an HTTP server."
So please do package the stubs with the client and avoid the dynamic downloading altogether.
I have included a "grant all" policy on both server and client and want to retain this even if I remove dynamic stub loading. Want to do this to override default system security policy. Is that OK?

I think you can get away with that for the Fly By Night Services assignment. However it is undesirable. Also from the new assignment: "You must not require the installation of a security manager."
One last question - On the client side I need to use DataInfo class. This class is Serializable. However, it is not getting downloaded dynamically when file:/<URL> is used. Do I need to do anything else to download classes which are not stubs?

No, there shouldn't be anything else you need to do. The JVM should look at the class itself and determine that it is serializable.
What sort of error are you getting?
Regards, Andrew
[ September 05, 2003: Message edited by: Andrew Monkhouse ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic