Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for reply, Abhijeet
My problem was solved.
reply
    Bookmark Topic Watch Topic
  • New Topic