Search code examples
javarmi

RMI multiple clients


Does RMI handles multiple clients by itself? i.e.

  1. is it possible to use a server function by multiple clients at the same time?
  2. if no, how can I do such a thing?
  3. if yes, how it works? does it make a new thread for each call? if one clients blocks the function what would happen with the next client? etc.

Solution

  • yes

    how it works? does it make a new thread for each call? if one clients blocks the function what would happen with the next client? etc.

    It creates a thread for each client connection.

    If one client calls a synchronized method or one which blocks other calls, calls made by other threads will block until that call releases the resource.

    It sounds like you already worked out the answers, do you have a more specific doubt?