How to know if a Zeo connection is read-only ?
Hi, Another product developpment problem ;) I've got 2 kind of Zope instances : 1/ "RO Zopes": - / is a local FileStorage - /somefolder is a ZeoStorage mounted read-only 2/ "RW Zopes": - / is a local FileStorage - /somefolder is a ZeoStorage mounted read-write I would like to know, inside a Zope product, how I can know if I am in a RO or RW Zope instance. Thanks for your help. Pascal ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************
Pascal Peregrina wrote at 2005-3-8 17:30 +0100:
Another product developpment problem ;)
I've got 2 kind of Zope instances : 1/ "RO Zopes": - / is a local FileStorage - /somefolder is a ZeoStorage mounted read-only 2/ "RW Zopes": - / is a local FileStorage - /somefolder is a ZeoStorage mounted read-write
I would like to know, inside a Zope product, how I can know if I am in a RO or RW Zope instance.
Tim Peters answered such a question recently. Search the mailing list archives ("zodb-dev", "zope-dev", "zope"), search for "isReadOnly". -- Dieter
On Mar 8, 2005, at 17:30, Pascal Peregrina wrote:
Hi,
Another product developpment problem ;)
I've got 2 kind of Zope instances : 1/ "RO Zopes": - / is a local FileStorage - /somefolder is a ZeoStorage mounted read-only 2/ "RW Zopes": - / is a local FileStorage - /somefolder is a ZeoStorage mounted read-write
I would like to know, inside a Zope product, how I can know if I am in a RO or RW Zope instance.
Grab an object and do... my_object._p_jar.isReadOnly() jens
participants (3)
-
Dieter Maurer -
Jens Vagelpohl -
Pascal Peregrina