Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic Stub Loading with file URL's

 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have trouble downloading stub class files dynamically with file URL, when I run the client on a different machine than the server. However, if I run the client and server on same machine it works fine.
I read following on Sun's web site (http://java.sun.com/products/jdk/1.2/docs/guide/rmi/codebase.html)
Like applets, the classes needed to execute remote method calls can be downloaded from "file:///" URLs, but like applets, a "file:///" URL generally requires that the client and the server reside on the same physical host, unless the file system referred to by the URL is made available using some other protocol, such as NFS.
Has anybody experienced this ? Any comments ??
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anybody experienced this ?

Yep. We all have, and I beleive we all decided not to use Dynamic Downloading. Youbasically need a web server for it, and you can't assume the assessor will have one.
You will need to include your stubs et al in your client jar file.
Mark
 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, Mark.
 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose, in that case (i.e. without dynamic downloading of stub), policy file is not required on the client side. Any one, please confirm !!
thanks
 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not using dynamic loading of _Stub, policy file or RMISecurityManager in either client or server.
 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any more opinions on the issue of whether it is OK not to use security manager on client side if dynamic downloading is not used i.e. stub file etc are part of client.jar ???
 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not using java.policy or RMI Security Manager either in client or server. I am bundling _Stub classes with my client.jar
 
Abhinav Anand
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I know that using dynamic class download can cause much trouble while documenting about the requirement of web server.
But just think that there is one server and more than 500 clients. So, a new functionality enhancement on server side would require to physically make available the stub file once again to all the clients. Do you think that one can pass with good score with this assumption.
Any suggetions are welcome
Thanks,
Vishal
 
Robin Underwood
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having problems with this issue too. I already wrote my code using the standard assumption that the evaluator won't have a web server, but now I'm having second thoughts. Tomcat and Orion are free and easy to install. I'm just not sure it makes sense to have an RMI application without dynamic code downloading.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just not sure it makes sense to have an RMI application without dynamic code downloading.

In the real world you wuold be right. However this is not this and you are putting too much thought into it. You cannot and should not expect the assessor to have a webserver, or to download a free one.
So why worry and wast some time on this when it is beyond scope.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic