[ZODB-Dev] Mounted Storage and ClassFactory problems
Júlio Dinis Silva
juliodinis@hotmail.com
Tue, 21 May 2002 02:12:51 +0100
Hi,
I'm mounting a SubData.fs in MainData.fs using MountedFileStorage.
MainData.fs has the product "ProductA" which implements one ZClass
called "ZClassA".
SubData.fs doesnt have this product in Control_Panel, but has
a folder with lets say 1000 instances of objects of ProductA.ClassA.
The problem is that when I mount SubData.fs in MainData.fs all my ClassA
instances became "product broken" instances.
But this is strange because if I try to create an instance of ClassA in my
mounted SubData.fs it works ok, but if I unmount subData.fs and mount it
again the instance I created and that it was ok is now broken, "saying" the
Broken Product message.
Whats happening here is that my mounted db are not getting the parent db
classfactory correctly.
I know (http://cvs.zope.org/StandaloneZODB/ZODB/Mount.py?sortby=date),
that Mount.py was changed to address this ClassFactory issue and I dont
know If to became an standalone zodb some bug was introduced.
BottomLine, I am able to mount SubData.fs and create in it new instances
from a ZClassA defined in MainData.fs. But when I mount SubData.fs already
existing instance of ZClassA that are in SubData.fs became broken.
This doesnt happens with filesystem based products, and I am not
sure 100% that I've seen this working in the past, but since I'm seeing
the changes in ZODB to address this issue and specially revision 1.11.2.2:
>Mount no longer has any dependencies on the Zope package. It was
> >importing Zope.ClassFactory so that ZClasses could be loaded from the
> >root database.
>Instead of importing the class factory now we just use the parent's
>class factory as the mounted database's class factory. This solves >some
>problems with the test suite (but apparently not all... :-( )
My main objective is to have a MainData.fs with my Zclass based product,
and instances of this product in a separated Data.fs.
I've tested MountedFileStorage and ExternalMount and zclass product broken
problem happens with both products.
Is there a way to create a Data.fs With NO Control_Panel, i.e, with
only lets say a folder and some objects in that folder? No acl_users, no
nothing else. Maybe If I can create that kind of Data.fs my problem is
solved because I have only one Control_Panel from the MainData.fs.
Thanx for any help, comments.
Regards,
Julio Dinis Silva
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com