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 ??
Joined: Feb 08, 2001
What type of remote object are you talking about? session ejb, entity ejb, CORBA object, rmi object..?
Joined: Feb 24, 2001
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