[Zope3-Users] Problem with ZODB...

Thierry Florac thierry.florac at onf.fr
Wed Oct 25 10:08:24 EDT 2006


  Hi,

I know this message is not closely related to Zope3, but I hope someone
could help me.
I have an application with :
 - a local ZODB
 - a remote ZODB accessed throught ZEO and a ClientStorage to read or
duplicate a few informations when required.

But if I do, for example :

        def copyToRemote(source):
            storage = ClientStorage((hostname, port))
            db = DB(storage)
            tm = transaction.manager
            connection = db.open(transaction_manager=tm)
            root = connection.root()
            app = root['Application']
            parent = traversing.api.getParent(source)
            name = traversing.api.getName(source)
            remoteParent = traversing.api.traverse(app, name)
            remoteObject = Folder()
            remoteParent[name] = remoteObject

When transaction is committed, I receive an InvalidObjectReference for
'remoteObject' ("Attempt to store an object from a foreign database
connection") which I don't understand, as remoteObject is a new object
which is not loaded from the local ZODB...
I've tried to find a few documentation about multi-databases
applications, but can't find how to manage this problem.

Of course, any help would be really appreciated...
Thanks in advance,

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : thierry.florac at onf.fr
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85



More information about the Zope3-users mailing list