Dear sirs,
i'm a software developer from germany and actually writing a web-based
application. This application is based on zope, because in my opinion
zope is perfect for this. I've developed this application as a python
based product, the first version written in dtml was too slow.
Everything has worked fine, till I wanted to develop a new feature.
In my application I'm using a server-based sessions-management, which
stores my object instances in a sessions-directory, which itself is
stored in the ZODB. Now one of these objects has a dictionary, which
stores multiple subobjects, for example the main object is a company,
which has subobjects representing contact-persons in this company. Now
I've written functions, which allow the user to add/change and remove
contact-persons for a company. To let this work, the companies object
with all the subobject is stored in the ZODB. Now the problem is, that
zope seems to forget the contents of the dictionary. You can add, remove
and change the subobjects, but suddenly the dictionary contains only
that subobjects, which where in at the beginning.
Example:
The companies instance is stored into a ZODB Folder with the id
"Company10". Now this instance has a property "contacts", which has a
directory named "__items__". The contacts itself are represented by
another object, which instances are stored in contacts.__items__. So if
you call Company10, there are 3 contacts saved into __items__.
Company10.contacts.__items__{1:Contact Instance at ..., 2:Contact
Instance at..., 3:Contact Instance at ...}
You can now add, remove and change the contacts for the company, but
suddenly all changes made for the __items__ dictionary are lost. Maybe
you've deleted all of the initial instances, and added two new contacts,
your changes disappear and the dictionary contains only the initial
three contacts.
I couldn't find out, why or when this is happening. BUT: if I start the
zope server in debug mode, everything is working fine !
I started the development with zope 2.4.0, but even the update to 2.4.3
doesn't solved the problem. I've read all the changes made since 2.4.0
to 2.5.0, but I couldn't find an entry matching my problem.
I then thought to pickle the objects myself and save them to the linux
filesystem. But it's not possible to pickle my objects, cause there are
references to the zope ZODB and the REQUEST object, which is obviously
not pickable.
Do you know how to solve this problem ? I don't know, what to do else.
In general, the whole application is based on the mechanism, storing
objects and subobjects into the ZODB, cause HTTP is a connection-less
protocol.
Thanks for your help in forward.
Yours
Marcus Ollas.
___________________________________________
__
| | | \ / LOXCOM
| | | \/ digital services GmbH
| | | /\ Weseler Str. 67-69
|__ |__| / \ D-45721 Haltern
Marcus Ollas
Systems Engineering
Telefon: +49 (0) 2364 / 9238-94
Telefax: +49 (0) 2364 / 9238-90
Mobil: +49 (0) 173 / 539 6150
Email: mco(a)loxcom.net
___________________________________________