aspose file tools*
The moose likes Distributed Java and the fly likes how to change fields  of server using RMI from a client? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "how to change fields  of server using RMI from a client?" Watch "how to change fields  of server using RMI from a client?" New topic
Author

how to change fields of server using RMI from a client?

Xiaoyan Sun
Greenhorn

Joined: Feb 23, 2010
Posts: 6
Hi all,

I want a client to use RMI to change field value of a server.

for example,
//interface


//server


//client


I'm new to RMI. It seems that I cannot change the field of the server. But I have to use this way to update the fields of server,I mean through RMI. Can anybody give me a hint? I will appriate that.

[NK: Added code tags. Please UseCodeTags]
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

Xiaoyan Sun wrote:But I have to use this way to update the fields of server,I mean through RMI.


Yes RMI is an easy way to update the server state. You do not want to use RMI?


apigee, a better way to API!
Xiaoyan Sun
Greenhorn

Joined: Feb 23, 2010
Posts: 6
I do want to change field using RMI. But it doesn't work. When i try to print the fingertable, it is null. I don't know where i am wrong.
Abhijeet Nalawade
Greenhorn

Joined: Apr 01, 2007
Posts: 20
Xiaoyan,

If your problem is not solved could you please do a few amendments to your code.

//OpFunction interface modifications
String REGISTRY_NAME = "//localhost:1099/OpFunction";
int REGISTRY_PORT = 1099;


//Server, main() modifications



//Client, method modifications



Let me know if you face any further problems.
Xiaoyan Sun
Greenhorn

Joined: Feb 23, 2010
Posts: 6
Thank you for reply, Abhijeet
My problem was solved.
 
 
subject: how to change fields of server using RMI from a client?