• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is RMI Thread Safe?  RSS feed

 
Isuru Sampath
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should we implement thread safety or does the RMIR create a seperate object for each request, which would run on a seprate thread?
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

A method dispatched by the RMI runtime to a remote object implementation may or may not execute in a separate thread. The RMI runtime makes no guarantees with respect to mapping remote object invocations to threads. Since remote method invocation on the same remote object may execute concurrently, a remote object implementation needs to make sure its implementation is thread-safe.

Java Remote Method Invocation: 3.2 - Thread Usage in Remote Method Invocations
 
Isuru Sampath
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Joe, that really is definitive.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!