[ZODB-Dev] I need disconnected mode functionality,
	but i get ClientDisconnected exception
    Mihai Ilinca 
    muqker at muqker.com
       
    Mon Jan 30 13:11:23 EST 2006
    
    
  
Hi.
I want to have a ClientStorage that would work in both connected and 
disconnected (to zeo-server) mode. When zeo-server is not up (or reachable), 
I would like ClientStorage to use a local cache. Is that possible with ZEO?
Right now I instanciate ClientStorage with 
ClientStorage(
                                zeoServerAddress,
                                name = 'name',
                                client = 'client',
                                var = 'path',
                                wait = False
	)
When I try to access the attributes of the root persistent object (instance of 
PersistentMapping) I get a ClientDisconnected exception:
/usr/lib/python2.4/site-packages/ZODB/Connection.py in setstate(self, obj)
/usr/lib/python2.4/site-packages/ZODB/Connection.py in _setstate(self, obj)
/usr/lib/python2.4/site-packages/ZEO/ClientStorage.py in load(self, oid, 
version)
/usr/lib/python2.4/site-packages/ZEO/ClientStorage.py in loadEx(self, oid, 
version)
/usr/lib/python2.4/site-packages/ZEO/ClientStorage.py in __getattr__(self, 
attr)
ClientDisconnected:
I know that the client is disconnected, as zeo-server is not up, but how can I 
make it so that I won't get this exception anymore, but instead have ZEO read 
the persistent objects from the local cache, transparently?
Thanks.
-Mihai
    
    
More information about the ZODB-Dev
mailing list