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

Re: Objects inside objects don't persist??!?



On Mon, 05 Jun 2000, Amy wrote:
> >%_Falko,
> 
> I don't think that your code tests the condition I described.  When I
> create
> an object that contains a vector, I make other interface calls that
> change the
> values of the vector, which I can see when I invoke my print method.
> However,
> when I close the database, re-open it, retrieve the object by name and
> print the
> contents, they have been reset to their original values.  I have
> re-checked my
> code (which is very simplified at this point) and I cannot see a problem
> with it.

AmyImpl.setName() changes the state of the object. So it has to be an update
method. You can mark a method to be an update method by providing a XML Class
Descriptor file or by inserting special comments in the Amy.java interface
file (see Auto.java). This comment is missing in your code. Without, the
transaction commit does not change the object in the database - so your changes
go away when the object is deactivated, which may happen at each time but
surely when the database server is stoped.


Falko

> 
> I can't see where your code ever changes the default values set in the
> constructor.
> 
> I will attach my trivial example.
> 
> Regards,
> Amy Christensen
> University of Illinois, U.S.A.
> 

----------------------------------------
Content-Type: text/plain; name="Local.java"
Content-Transfer-Encoding: 7bit
Content-Description: 
----------------------------------------

----------------------------------------
Content-Type: text/plain; name="Amy.java"
Content-Transfer-Encoding: 7bit
Content-Description: 
----------------------------------------

----------------------------------------
Content-Type: text/plain; name="AmyImpl.java"
Content-Transfer-Encoding: 7bit
Content-Description: 
----------------------------------------

----------------------------------------
Content-Type: text/plain; name="Makefile"
Content-Transfer-Encoding: 7bit
Content-Description: 
----------------------------------------

----------------------------------------
Content-Type: text/plain; name="output.txt"
Content-Transfer-Encoding: 7bit
Content-Description: 
----------------------------------------

-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de