[Zope] /temp_folder for ZEO session
Adam Szpakowski
worf at optics.polsl.gliwice.pl
Tue Oct 21 19:06:04 EDT 2003
Hi,
I'm struggling with seting up ZEO environment. For now I set up a Zope 2.7b2
working as ZEO client with ZEO server. In zope.conf I have two zobd_db. One
for mount point "/" and ZEO client and the second one for mount point "/
temp_folder" as TemporaryFolder. With Zope everything works fine. In database
management i have two bases and in zeo logs connections are logged.
Now I try to set up another connection to the same ZEO server from clean
python... and get stuck with OFS/Application.py trying to set object
'session_data' after executing Zope.startup().
If I understand correctly the problem lies in a Data.fs. Zope modifies Data.fs
and remove /temp_folder becouse it is using the second database for it
(TemporaryFolder).
For a test I create another ZEO server with no database file. ZEO create the
database with temp_folder in it and the problem do not appear (connection
from python was succesfull). After that I attached the Zope (as ZEO client)
to this ZEO server and the problem show up again.
I use quite typical config for ZEO:
<custom_zodb.py>
import ZServer
import ZEO.ClientStorage
Storage=ZEO.ClientStorage.ClientStorage(('localhost',7770),storage='main')
and bind from python to ZODB (through ZEO) using:
Zope.startup()
app=Zope.app()
So my question is: How can I create from python a TemporaryStorage for ZEO
client and specify it's mount point as /temp_folder?
I've searched the net and newsgroups (and Zope code) but there is no clear
solution for me. I would like to mimic the behaviour of ZConfig for zope.conf
and it's zodb tags. I suppose that the answer is in Zope code but
unfortunetly its quite comlicated and after few hours of going through it I
think that's it is time to call for help ;).
Thank's in advance
--
Adam Szpakowski
Silesian University of Technology - Institute of Physics
Department of Optoelectronic
e-mail: worf at optics.polsl.gliwice.pl
More information about the Zope
mailing list