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

Re: nameForObject()?



On Tue, 30 Jan 2001, Andreas Monitzer wrote:
> >Andreas, no matter if you use LocalDatabase or RemoteDatabase or any other yet
> >to be developed kind of database connection one thing will never 
> >change because
> >it is the basic architecture of ozone: the one and only instance of a database
> >object always runs inside the server!
> >
> >That is, there is no way to access your "regular object" directly. It always
> >runs in an other address space than the client. (for LocalDatabase this is not
> >really true but it makes no difference here)
> >
> >So the answer to your question is: you can have many proxies refering to on
> >target. This will not cause the target to be duplicated in any case.
> 
> You didn't understand the question.
This seems to happen to often last time :(

> 
> class OneImpl extends OzoneObject implements One {
> 	String test;
> 	public void setString(String in) {
> 		test=in;
> 	}
> }
> 
> class TwoImpl extends OzoneObject implements Two {
> 	String test;
> 	public void sendString(One target) {
> 		target.setString(test);
> 	}
> }
> 
> Will 'test' be duplicated? I guess it will, since the other object 
> could be on another computer (theoretically).
Yes, it is duplicated. The simple in-VM call of sendString() does not but at
least when the two database objects get serialized it will.

> In fact, I don't use a String, but a very large object (maybe a few 
> MB). Is there a way to avoid this?
A big object that is used by several other database objects should probably be a
database object itself.


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