Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Are Remote Objects Thread Safe

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI
could anyone tell me if the instance variables of remote objecte in (rmi) thread safe
ie if 2 cleints symultaneously invoke a method of the object
will the requests be queued or will they be threaded ??
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What type of remote object are you talking about? session ejb, entity ejb, CORBA object, rmi object..?
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jamshed,
Here's a link to the relevant section of the RMI specification:
http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmi-arch3.html
Basically what it says is that multiple calls may or may not execute in a single thread, and that you're responsible for ensuring the thread safety of your code. So in other words, no, accessing instance variables within a method called remotely is not inherently thread-safe.
------------------
Brett Spell
Author, Professional Java Programming
 
I've read about this kind of thing at the checkout counter. That's where I met this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic