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

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

 
Xiaoyan Sun
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Xiaoyan Sun
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for reply, Abhijeet
My problem was solved.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic