[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quick question on threads & remote stubs



On Sun, 01 Apr 2001, Reason wrote:
> If two separate threads within the same JVM call
> ExternalDatabase.objectForName(name), do they receive references to the same
> stub object or to two different stub objects? In other words, does each
> different thread within a single JVM requesting an interface to the same
> persistant object require the creation of a new stub?

Yes, each subsequent call of objectForName, regardless if this is in the same
or a different thread, creates and returns a new proxy object. proxy objects
are very small (6 bytes) so this should not be a problem. An object cache could
help to reduce the number of proxy objects in the VM but this would also add an
extra overhead to search in the cache each time a proxy is created.


Falko
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com