uploading a file to a host using RMI callback
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jorge_Olmedo
Posted On:   Friday, May 25, 2007 02:40 PM

Hi, everyone. I'm trying to upload a file from a client to a server. The thing is that I want to use RMI callback, so, following, I think, the standards for RMI application design, I create a ServerRemote Interface and attached to this a register method. Therefore, client calls this method and so... The big deal comes now> I want to upload a file which exists in the client side. So, reading a while, I found RMI callbacks and decide its a good chance to attack the challenge. I declared an interface in the client side (that which serves as a stub to the RMI server) and place a method loadFile() that server must call in order to upload the file indeed. But something happens, and I think it's a problem of location: I know that when a client calls a method, the stubs   More>>

Hi, everyone. I'm trying to upload a file from a client to a server. The thing is that I want to use RMI callback, so, following, I think, the standards for RMI application design, I create a ServerRemote Interface and attached to this a register method. Therefore, client calls this method and so... The big deal comes now> I want to upload a file which exists in the client side. So, reading a while, I found RMI callbacks and decide its a good chance to attack the challenge. I declared an interface in the client side (that which serves as a stub to the RMI server) and place a method loadFile() that server must call in order to upload the file indeed. But something happens, and I think it's a problem of location: I know that when a client calls a method, the stubs method called runs in the client's JVM. Something like this happens when I use callback_ I mean, only the stub of the client located at server side, runs in the server's JVM? SOmeone can explain me and give me a little light on this subject?

Thanks for your time.
Jorge Olmedo.
:-)))

   <<Less

Re: uploading a file to a host using RMI callback

Posted By:   Edward_Harned  
Posted On:   Tuesday, May 29, 2007 12:30 PM

Format your questions into paragraphs so we can read it easily.


Technically, there is no such thing as "callback". Callback is simply an RMI invocation in the opposite direction. Set up your client to be a server in the same way you set up the original server.


There is a tutorial for callback here: http://java.sun.com/developer/onlineTraining/rmi/exercises/RMICallback/index.html

About | Sitemap | Contact