1

if number of java clients are 2000 and if they call remote method how many threads are executed in RMI server side?

Is there any maximum limit of the number of Threads in RMI serverside?

msaif
  • 504
  • 1
  • 7
  • 23
  • Yes, the limit is set in the server properties, check the server documentation, what is the thread pool size for the serving of incoming requests. – Krzysztof Cichocki Mar 03 '17 at 08:05
  • @KrzysztofCichocki No, there is no maximum by default. You can impose one via a system property, from Java 6. – user207421 Mar 08 '17 at 02:49

1 Answers1

1

if number of java clients are 2000 and if they call remote method how many threads are executed in RMI server side?

Up to 2000.

Is there any maximum limit of the number of Threads in RMI serverside?

No. There is no limit specified. Specific implementations may have such limits, but the Sun/Oracle implementation isn't one of them. You can set a maximum, in the Sun/Oracle JRE, via sun.rmi.transport.tcp.maxConnectionThreads, but by default there isn't one.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • thanks. if no of clients will increase from 2000 to 5000 or even more, then we know that Thread consumes memory in heap, then is there any OutOfMemory Exceptions happens? if so is this exception is catched in RMI client program? – msaif Mar 03 '17 at 09:35
  • It *should* manifest itself at the client as a `ServerError` with a cause of `OutOfMemoryError`. – user207421 Mar 03 '17 at 09:38