Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic ClassLoading in RMI

 
Radha MahaLakshmi
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am developing an application using RMI and i am through with that.Now i wanted to use the dynamic class loaindg to load the required classes in runtime insted of coping those classes in the clients machine and made avilable through classpath.Here i need some claifications.
let us say i am working on a machine m1 and i am developing some client code like HelloClient.for this i have a remote interface Hello.java and implementation class HelloImpl.java.
When i use the dynamic classloading what are all the classes would be downloaded from the code base.Do i need to copy the client class also into the code base and download or i can run the client class from my machine and the HelloImpl_stub.class will be downloaded automatically.
Can some body provide small smple for this dynamic loading.
Regards
Radha
[ August 24, 2003: Message edited by: Radha MahaLakshmi ]
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the RMI forum (Distributed Java).
 
Diego Bowen
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there, from my reading thus far, the xxx_Stub.class is the only class that gets loaded at runtime using a class loader. I do however have a question to pose to the rest of the RMI community. I have successfully got a RMI helloWorld app running on two machines. Where M1 the server, has Hello.class, HelloImpl.class, HelloImpl_Stub.class, HelloImpl_Skel.class and HelloServer.class. M2 the client, the HelloClient.class, Hello.class and HelloImpl_stub.class. My question is: Since there is no "dynamic" loading of classes, in particular the "HelloImpl_Stub.class", are there any SECURITY issues involved? Considering that I want this to be as secure as possible?
 
Idly Vada
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dynamic class loading makes passing of data as well as behavior. Using dynamic class loading, we can send full object graph by passing an object as the argument to a method call. The only requirement for passing the object is that the object be serializable.
One should remember that in dynamic class loading, the object instance is serialized rather than it's stub
Coming to your application,you should have HelloImpl_stub.class on the client side.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic