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

Re: Newly created objects created have invalid state




> The object gets created by:
> 
> qsItemTmp = (QuestionnaireSessionItem) 
> database().createObject(QuestionnaireSessionItemImpl.class.getName(), 
> 0,null,"AU.com.harrison.innerview.questionnaire.QuestionnaireItem|AU.com.harrison.innerview.questionnaire.QuestionnaireSessionGroup", 
> new Object[] {qItem, this});
> 
> Immediately after the execution of this statement the qsItemTmp object has a 
> value in its response attribute which is the same as the one that was set by 
> user entry during the previous program execution.
> 
> During the creation of this object the attribute value is has not yet been 
> set when the onCreate() method is called. There are no calls to the method 
> that sets the attribute, and the value is not in the createObject() 
> parameters.

Really strange. At the moment I've got no idea what this could be. Falko is in
vocation for the next two weeks, maybe he knows something more about it. What I
don't understand is if qsItemTmp has no name and it's not reachable from any
root object, how do you get back such and object ? Or do you delete it at the
end of the appliction execution from the database ? And if so why do you store
it at all ?
      
> I don't know if it is significant but a newly created database has a 
> nameTable.wizard file which is missing after the program has executed. The 
> log file has the following entries:
> 
> [info] (816) WizardStore: startup...
> [info] (816) WizardStore:     no valid idTable file found...
> [info] (816) WizardStore:     recovering...
> [info] (816) WizardStore:     cluster: 77
> [info] (816) WizardStore:         142 containers
> [info] (816) WizardStore:     cluster: 3010
> [info] (816) WizardStore:         103 containers
> [info] (816) WizardStore:     cluster: 5
> [info] (816) WizardStore:         369 containers
> [info] (816) WizardStore:     614 IDs, 14 name(s))

It seems that the database wasn't stopped cleanly. So the id table needs to be
recovered. Was there something unusual while shutting down the database ?
  
> How can a newly created object have the state of an instance from a previous 
> session without any explicit read and update?

Really interesting question ...

Best Regards,
Gerd

-- 
________________________________________________________________
Gerd Mueller                                    gerd@smb-tec.com     
SMB GmbH                                  http://www.smb-tec.com