0

I have RMI server with 2 methods: first changes some value in an array, second reads some value. Array is located in the server's memory. And I have a lot of (1-∞) clients, which call these methods. What happens when a few clients try to change the same value at the same time? Server crashes? Or only acces time increased (server makes request queue?) ?

sinedsem
  • 5,413
  • 7
  • 29
  • 46

1 Answers1

1

What happens when a few clients try to change the same value at the same time? Server crashes? Or only acces time increased (server makes request queue?) ?

Neither. The RMI Specification carefully states that there are no guarantees about server-side threading. That means that all the calls can execute concurrently. It is up to you to provide any required synchronization.

user207421
  • 305,947
  • 44
  • 307
  • 483