<div>hi all,</div>
<div> </div>
<div>i have my ontology in mysql. i connect mysql with zope and plone. and i made search interface also in Plone. Now i want to search my documents and display results according to the ontology. Can anyone suggest how to move forward for this?
</div>
<div> </div>
<div>thankx in advance,</div>
<div>bh<br><br> </div>
<div><span class="gmail_quote">On 12/19/05, <b class="gmail_sendername"><a href="mailto:zope-request@zope.org">zope-request@zope.org</a></b> <<a href="mailto:zope-request@zope.org">zope-request@zope.org</a>> wrote:
</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Send Zope mailing list submissions to<br> <a href="mailto:zope@zope.org">zope@zope.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit
<br> <a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>or, via email, send a message with subject or body 'help' to<br> <a href="mailto:zope-request@zope.org">
zope-request@zope.org</a><br><br>You can reach the person managing the list at<br> <a href="mailto:zope-owner@zope.org">zope-owner@zope.org</a><br><br>When replying, please edit your Subject line so it is more specific
<br>than "Re: Contents of Zope digest..."<br><br><br>Today's Topics:<br><br> 1. Re: Zope Persistence (was: XML-RPC within ZOPE) (Lennart Regebro)<br> 2. Re: Zope Persistence (was: XML-RPC within ZOPE) (Lennart Regebro)
<br> 3. zyncer 0.7.0? (David H)<br> 4. Re: zyncer 0.7.0? (David H)<br> 5. RE: zopectl or runzope just won't start zope (Russell Winter)<br> 6. Re: Zope Persistence (was: XML-RPC within ZOPE) (Jan-Ole Esleben)<br> 7. Re:
zope-2.9 r40780 make install doesn't finish, files<br> missing from bin (Sascha Ottolski)<br> 8. Re: Zope Persistence (was: XML-RPC within ZOPE) (Lennart Regebro)<br> 9. Re: Zope Persistence (was: XML-RPC within ZOPE) (Jan-Ole Esleben)
<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Sun, 18 Dec 2005 01:30:39 +0100<br>From: Lennart Regebro <<a href="mailto:regebro@gmail.com">regebro@gmail.com
</a>><br>Subject: Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)<br>To: Jan-Ole Esleben <<a href="mailto:esleben@gmail.com">esleben@gmail.com</a>><br>Cc: zope user list <<a href="mailto:zope@zope.org">
zope@zope.org</a>><br>Message-ID:<br> <<a href="mailto:319e029f0512171630s3921efdaseb54be4c12281480@mail.gmail.com">319e029f0512171630s3921efdaseb54be4c12281480@mail.gmail.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1
<br><br>On 12/17/05, Jan-Ole Esleben <<a href="mailto:esleben@gmail.com">esleben@gmail.com</a>> wrote:<br>> To simplify, in ZOPE, for any given product, during a<br>> transaction the product is effectively locked.
<br><br>This statement is incorrect.<br><br>> So if I have, say, a<br>> list field that contains some data and a dictionary field that<br>> contains some other data, and the "internal" call changes the dict
<br>> while the original call changes the list, that breaks the transaction,<br>> while in usual situation in a database, nothing would break.<br><br>If you use all non-persistent aware dicts and lists, yes. Using only
<br>dicts and lists is suboptimal in most OO-languages, and that goes for<br>Python too. It is correct that with Zope, the negative impact of that<br>type of pre'ogramming-style is increased. This is however simply<br>solved by not doing that type of suboptimization, and instead using
<br>persistant-aware objects.<br><br>> No. It does happen, and it _did_ happen in my original problem. Zope<br>> doesn't even care if anything actually changes, it just considers an<br>> object changed that set self._p_changed=1.
<br><br>No, se above.<br><br>> > You just said "different sets of data". That reasonably must mean<br>> > different objects, unless you envision having huge objects with only<br>> > marginally connected sets of data all stored as attributes. And then
<br>> > you have other problems. :-)<br>><br>> No. An object usually binds together different sets of data (as in the<br>> above example - it has several fields, and that is true for almost any<br>> given object).
<br><br>Yes. You said "different sets of data". That reasonably means<br>different objects. If it doesn't, yuo need to take a long hard look at<br>your object hierarchy.<br><br>> What you are saying is "don't program the ZOPE way",
<br><br>No, in fact, I'm saying "program the Zope way", and I am beginning to<br>suspect that the problem is that you are not.<br><br>> and it would eventually lead to the conclusion that your product<br>> classes should not have any persistent data, which is the conclusion I
<br>> have come to.<br><br>Then you didn't read what I said.<br><br>> > > That's my whole point. I think it is a very<br>> > > significant point nonetheless, because this is just an extreme case of<br>
> > > what happens when you couple data and programs, and persistent classes<br>> > > are just that: application data inside program code.<br><br>> > Eh, no they aren't.<br>><br>> Please don't just claim stuff.
<br><br>You do.<br><br>> ZOPE has persistent classes. Persistent<br>> classes store data that in ordinary programs would not survive as<br>> long.<br><br>Not unless you tell them to. If you don't want the data stored, then
<br>do not set it as an attribute on a persistent object.<br><br>> In ordinary systems, you would have to find a way to store the<br>> data and retrieve it, thus having a model that isn't implicit and<br>> entangled with your code.
<br><br>What is implicit with it?<br><br>> Of course, you could do the same in ZOPE,<br>> but I addressed that above, and you could mess up ordinary code, but I<br>> think we're agreed that it is not something you should aim for (and I
<br>> think I have made it clear why I do not believe it's as easy to mess<br>> up generic Python code in this way)<br><br>Well, sorry, it's not clear for me.<br><br><br>To summarize:<br><br>If you have two different processes changing the same set of data, you
<br>will get confllict errors. You claim that you will not, but this is<br>false.<br><br>You claim that you can't control what a persistent class store. That is false.<br><br>You claim that the whole Zope product gets locked, that is false. It's
<br>on a object-basis, not a product basis.<br><br>You claim that things get locked that shouldn't be locked in Zope. It<br>is not clear to me why you say that.<br><br>--<br>Lennart Regebro, Nuxeo <a href="http://www.nuxeo.com/">
http://www.nuxeo.com/</a><br>CPS Content Management <a href="http://www.cps-project.org/">http://www.cps-project.org/</a><br><br><br>------------------------------<br><br>Message: 2<br>Date: Sun, 18 Dec 2005 01:35:46 +0100
<br>From: Lennart Regebro <<a href="mailto:regebro@gmail.com">regebro@gmail.com</a>><br>Subject: Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)<br>To: Jan-Ole Esleben <<a href="mailto:esleben@gmail.com">esleben@gmail.com
</a>><br>Cc: Tino Wildenhain <<a href="mailto:tino@wildenhain.de">tino@wildenhain.de</a>>, zope user list<br> <<a href="mailto:zope@zope.org">zope@zope.org</a>><br>Message-ID:<br> <<a href="mailto:319e029f0512171635n1bc72607ie198b44fbd8128e8@mail.gmail.com">
319e029f0512171635n1bc72607ie198b44fbd8128e8@mail.gmail.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1<br><br>On 12/17/05, Jan-Ole Esleben <<a href="mailto:esleben@gmail.com">esleben@gmail.com</a>> wrote:
<br>> You should be able to<br>> design stuff incrementally with a little experimentation along the way<br>> without constantly impending danger of it all crashing down on you.<br><br>I don't undertand why you say that this isn't possible in Zope.
<br><br>> That's how Python works, and RoR etc. In ZOPE, we're back to the<br>> temptation to "just stuff a bunch of data into my object". And it's<br>> not even obvious that this is a problem, because everything is so
<br>> tightly interdependent. It's exactly what Python usually avoids<br>> ("explicit is better than implicit").<br><br>I agree that there is too much implicitness in Zope 2. I don't agree<br>that persistance is a part of that. It isn't implicit at all. Maybe
<br>it's not easy to understand, but it isn't particularily implicit, and<br>neither is it uncontrollable, as you seem to say.<br><br>--<br>Lennart Regebro, Nuxeo <a href="http://www.nuxeo.com/">http://www.nuxeo.com/</a>
<br>CPS Content Management <a href="http://www.cps-project.org/">http://www.cps-project.org/</a><br><br><br>------------------------------<br><br>Message: 3<br>Date: Sat, 17 Dec 2005 18:13:18 -0800<br>From: David H <
<a href="mailto:bluepaul@earthlink.net">bluepaul@earthlink.net</a>><br>Subject: [Zope] zyncer 0.7.0?<br>To: zope user list <<a href="mailto:zope@zope.org">zope@zope.org</a>><br>Message-ID: <<a href="mailto:43A4C5BE.60402@earthlink.net">
43A4C5BE.60402@earthlink.net</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Hi List,<br><br>I downloaded zsyncer-0.7.0 and am having problems. Its not working<br>for me and it no longer displays prompts for destination password and
<br>user name when clicking its <edit> tab. Anyone else seeing this?<br><br>More importantly, as a fall-back is there a version (0.6.1?) others<br>recommend?<br><br>All best,<br>David<br><br><br><br>------------------------------
<br><br>Message: 4<br>Date: Sat, 17 Dec 2005 19:58:01 -0800<br>From: David H <<a href="mailto:bluepaul@earthlink.net">bluepaul@earthlink.net</a>><br>Subject: Re: [Zope] zyncer 0.7.0?<br>To: Alan Milligan <<a href="mailto:alan@balclutha.org">
alan@balclutha.org</a>><br>Cc: zope user list <<a href="mailto:zope@zope.org">zope@zope.org</a>><br>Message-ID: <<a href="mailto:43A4DE49.6090301@earthlink.net">43A4DE49.6090301@earthlink.net</a>><br>Content-Type: text/plain; charset="iso-8859-1"
<br><br>Alan Milligan wrote:<br><br>>-----BEGIN PGP SIGNED MESSAGE-----<br>>Hash: SHA1<br>><br>>David H wrote:<br>><br>><br>>>Hi List,<br>>><br>>>I downloaded zsyncer-0.7.0 and am having problems. Its not working
<br>>>for me and it no longer displays prompts for destination password and<br>>>user name when clicking its <edit> tab. Anyone else seeing this?<br>>><br>>><br>>><br>>You need to use extended url auth syntax:
<br>><a href="http://username:password@your.domain.com/bla">http://username:password@your.domain.com/bla</a> ...<br>><br>>This is because we can have multiple targets all with different<br>>passwords ...<br>>
<br>>Alan<br>><br>><br>><br>Alan,<br><br>Thanks for your response. Apparently my <zope-instance>bin/zopectl stop<br>/ restart sequence was not working on my remote (zettai) instance.<br>I had to do a shutdown from the control panel and *then* a bin/zopectl
<br>start worked just fine - and zyncer came up as it should. The install of<br>zsyncer 0.7.0 on my *localr* system was fine - hence the disconnect in<br>what I was seeing ...<br><br>David<br>-------------- next part --------------
<br>An HTML attachment was scrubbed...<br>URL: <a href="http://mail.zope.org/pipermail/zope/attachments/20051217/1a59bae7/attachment-0001.htm">http://mail.zope.org/pipermail/zope/attachments/20051217/1a59bae7/attachment-0001.htm
</a><br><br>------------------------------<br><br>Message: 5<br>Date: Sun, 18 Dec 2005 22:54:05 +1100<br>From: "Russell Winter" <<a href="mailto:rwinter@r2solutions.com.au">rwinter@r2solutions.com.au</a>><br>
Subject: RE: [Zope] zopectl or runzope just won't start zope<br>To: "'Qass'" <<a href="mailto:qassair@gmail.com">qassair@gmail.com</a>>, <<a href="mailto:zope@zope.org">zope@zope.org</a>><br>Message-ID: <
00ed01c603c9$bf38d340$1e0a0a0a@WinterRGM><br>Content-Type: text/plain; charset="us-ascii"<br><br>Not that I am any real guru on this, however, I am still learning myself, my<br>2c worth....<br><br>The error output suggests that Zope is installed on a network share of some
<br>sort ...<br><br>File<br>"/network/share/home/sra/Zope-2.8.4-final/lib/python/Zope2/Startup/__init__.<br>py",<br>line 24, in ?<br><br>Are the permissions or effective user correct for the appropriate<br>filesystems and files.?
<br><br>If you installed the binaries as root, but are running Zope as another user,<br>you will need to assign either that effective user to the root group, or<br>potentially less hazardous, security wise, assign the correct effective user
<br>group rights to the filesystem area, including the network share.<br><br>If you have not assigned an effective user, or ran mkzopeinstance as root,<br>then you may see these type of errors when trying to run Zope as another
<br>user without the correct permissions. Or when running as root, when<br>effective user permissions are assigned elsewhere.<br><br>Russ<br><br>-----Original Message-----<br>From: <a href="mailto:zope-bounces@zope.org">zope-bounces@zope.org
</a> [mailto:<a href="mailto:zope-bounces@zope.org">zope-bounces@zope.org</a>] On Behalf Of Qass<br>Sent: Thursday, December 15, 2005 5:13 AM<br>To: <a href="mailto:zope@zope.org">zope@zope.org</a><br>Subject: [Zope] zopectl or runzope just won't start zope
<br><br>Hi:<br><br>I'm new to zope and yesterday installed zope 2.8.4 on a linux system running<br>python 2.3.5 Having followed installation instructions I got to the point of<br>'zopectl start' and got the following error message while trying both
<br>'runzope' and 'zopectl'.<br><br>I've tried installing different versions of Zope and get the same error<br>(error absent with Zope 3). At one point, Zope did start (I moved it to a<br>different port) but when I tried installing Plone in the Products directory
<br>of the zope instance, the 'Plone Site' did not show up in the drop down menu<br>on the right hand side of the ZMI. Which is why I decided to reinstall and<br>have been getting errors since. I haven't messed around with the Python
<br>installation at all.<br><br>In this latest install I ran 'make instance' intead of 'make install'<br>just to see if I would get the same error as I did yesterday when I had an<br>instance of Zope running and I did.<br>
<br>Any help in trying to fix this would be highly appreciated. I've tried<br>changing PYTHONPATH in the zopectl file but that just leads to more and more<br>errors.<br><br>Traceback (most recent call last):<br>File "/blah//Zope-
2.8.4-final/lib/python/Zope2/Startup/run.py", line 56,<br>in ?<br> run()<br>File "/blah/Zope-2.8.4-final/lib/python/Zope2/Startup/run.py", line 17, in<br>run<br> import Zope2.Startup<br>File "/blah/Zope-
2.8.4-final/lib/python/Zope2/__init__.py", line 60, in ?<br> from Zope2.Startup.run import configure<br>File<br>"/network/share/home/sra/Zope-2.8.4-final/lib/python/Zope2/Startup/__init__.<br>py",<br>line 24, in ?
<br> import ZConfig<br>File "/blah/Zope-2.8.4-final/lib/python/ZConfig/__init__.py", line 21, in<br>?<br> from ZConfig.loader import loadConfig, loadConfigFile<br>File "/blah/Zope-2.8.4-final/lib/python/ZConfig/loader.py", line 23, in ?
<br> import ZConfig.datatypes<br>File "/blah/Zope-2.8.4-final/lib/python/ZConfig/datatypes.py", line 19, in<br>?<br> import datetime<br>File "/blah/Zope-2.8.4-final/lib/python/DateTime/__init__.py", line 13, in
<br>?<br> from DateTime import DateTime<br>File "/blah/Zope-2.8.4-final/lib/python/DateTime/DateTime.py", line 21, in<br>?<br> from datetime import datetime<br>File "/blah/Zope-2.8.4-final/lib/python/DateTime/DateTime.py", line 21, in
<br>?<br> from datetime import datetime<br>ImportError: cannot import name datetime<br><br>Thank you very much for your help.<br><br>Qass<br>_______________________________________________<br>Zope maillist - <a href="mailto:Zope@zope.org">
Zope@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>** No cross posts or HTML encoding! **<br>(Related lists -<br><a href="http://mail.zope.org/mailman/listinfo/zope-announce">
http://mail.zope.org/mailman/listinfo/zope-announce</a><br><a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br><br><br><br>------------------------------<br><br>
Message: 6<br>Date: Sun, 18 Dec 2005 13:45:48 +0100<br>From: Jan-Ole Esleben <<a href="mailto:esleben@gmail.com">esleben@gmail.com</a>><br>Subject: Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)<br>To: Lennart Regebro <
<a href="mailto:regebro@gmail.com">regebro@gmail.com</a>><br>Cc: zope user list <<a href="mailto:zope@zope.org">zope@zope.org</a>><br>Message-ID: <<a href="mailto:3756d9750512180445u1c47cdccl@mail.gmail.com">3756d9750512180445u1c47cdccl@mail.gmail.com
</a>><br>Content-Type: text/plain; charset=ISO-8859-1<br><br>> > To simplify, in ZOPE, for any given product, during a<br>> > transaction the product is effectively locked.<br>> This statement is incorrect.
<br><br>You're right. It should be "during any transaction where there are<br>potential changes to the object". And I agree, it's actually a lot<br>more complicated than I'd thouht at first. What I describe can happen,
<br>but it happens under rather magical circumstances. I have an example<br>where it actually happens; this is code from a product that is<br>instantiated twice, one of those instances called TPCDest, the other<br>TestPChanged; the method called directly is "
TestPChanged.test()":<br><br>security.declareProtected("Use TestPChanged", "test_internal")<br>def test_internal(self, args=None, args2=None):<br> "Called by test via XML-RPC"<br> if args2:
<br> self.a.append(1)<br> self._p_changed = 1<br> if not args:<br> import xmlrpclib<br> s = xmlrpclib.ServerProxy("<a href="http://USER:PASSWORD@localhost:8080/">http://USER:PASSWORD@localhost:8080/
</a>",<br> allow_none=True)<br> s.TestPChanged.test_internal(1)<br> return self.a<br><br>security.declareProtected("Use TestPChanged", "test")<br>def test(self, args2=None):<br> "Called directly via ZOPE"
<br> if args2:<br> self.a.append(1)<br> self._p_changed = 1<br> import xmlrpclib<br> s = xmlrpclib.ServerProxy("<a href="http://USER:PASSWORD@localhost:8080/">http://USER:PASSWORD@localhost:8080/</a>",
<br> allow_none=True)<br> return s.TPCDest.test_internal()<br><br>Zope obviously looks at the code, because if you remove the "if args2"<br>(which is _never_ true), then a ConflictError happens.<br><br>Maybe I'm stupid, but could someone point out _where_ exactly I am?
<br><br>> > No. It does happen, and it _did_ happen in my original problem. Zope<br>> > doesn't even care if anything actually changes, it just considers an<br>> > object changed that set self._p_changed=1.
<br>> No, se above.<br><br>You're right that it doesn't always, but see my example.<br><br>> Yes. You said "different sets of data". That reasonably means<br>> different objects. If it doesn't, yuo need to take a long hard look at
<br>> your object hierarchy.<br><br>Simply not true. What if I have a field titles (that is a hash of<br>titles to Book objects)<br>and a field comments (that is an array of comments on the library)? Is<br>that so obviously
<br>not a sane example?<br><br>> > > > That's my whole point. I think it is a very<br>> > > > significant point nonetheless, because this is just an extreme case of<br>> > > > what happens when you couple data and programs, and persistent classes
<br>> > > > are just that: application data inside program code.<br>> > > Eh, no they aren't.<br>> > Please don't just claim stuff.<br>> You do.<br><br>I don't. I at least try to give reasons wherever I make a statement
<br>that could be challenged.<br><br>> > In ordinary systems, you would have to find a way to store the<br>> > data and retrieve it, thus having a model that isn't implicit and<br>> > entangled with your code.
<br>> What is implicit with it?<br><br>See the example for some major implicitness. It's also implicit<br>because you have no control over what a transaction considers a<br>tainted object. (You have no real control over the transaction).
<br><br>> If you have two different processes changing the same set of data, you<br>> will get confllict errors. You claim that you will not, but this is<br>> false.<br><br>I am explicitly talking about changing different sets of data within
<br>the same object. You noted that above yourself.<br><br>> You claim that you can't control what a persistent class store. That is false.<br><br>I don't. I say that if I want to avoid such problems as I describe<br>altogether, I cannot store anything in a persistent class and thus
<br>lose most of what makes ZOPE so interesting.<br><br>> You claim that the whole Zope product gets locked, that is false. It's<br>> on a object-basis, not a product basis.<br><br>I never said that, or at least I didn't mean it. If it sounded like
<br>that, I apologize (maybe I used Product metonymically for instance<br>somewhere, which would not be a good idea, I agree).<br><br>> You claim that things get locked that shouldn't be locked in Zope. It<br>> is not clear to me why you say that.
<br><br>See the example.<br><br>Ole<br><br><br>------------------------------<br><br>Message: 7<br>Date: Sun, 18 Dec 2005 15:32:40 +0100<br>From: Sascha Ottolski <<a href="mailto:sascha.ottolski@gallileus.de">sascha.ottolski@gallileus.de
</a>><br>Subject: Re: [Zope] zope-2.9 r40780 make install doesn't finish, files<br> missing from bin<br>To: <a href="mailto:zope@zope.org">zope@zope.org</a><br>Cc: Jeff Kowalczyk <<a href="mailto:jtk@yahoo.com">
jtk@yahoo.com</a>><br>Message-ID: <<a href="mailto:200512181532.41103.sascha.ottolski@gallileus.de">200512181532.41103.sascha.ottolski@gallileus.de</a>><br>Content-Type: text/plain; charset="iso-8859-15"
<br><br>Am Mittwoch, 14. Dezember 2005 21:11 schrieb Jeff Kowalczyk:<br>> I'm having some trouble with the 'make install' stage of Zope-2.9 svn.<br><br>Hi Jeff,<br><br>just stumbled over the same problem. By chance, we figured out how to do it:
<br>you need to "make sdist" beforehand, which creates a tarball for you, which<br>in turn you must use to perform the regular install. "make sdist" needs<br>"zpkg", which is found at <a href="http://svn.zope.org/zpkgtools/">
http://svn.zope.org/zpkgtools/</a>; don't know how to<br>install it, so we just changed the path in the makefile to point to the right<br>place, in our case<br><br> ZPKG=/mnt/source/svn/svn.zope.org/zpkgtools/bin/zpkg
<br><br><br>Hope that helps,<br><br>Sascha<br><br>--<br>Gallileus - the power of knowledge<br><br>Gallileus GmbH <a href="http://www.gallileus.info/">http://www.gallileus.info/</a><br><br>Pintschstra�e 16 fon +49-(0)30-41 93 43 43
<br>10249 Berlin fax +49-(0)30-41 93 43 45<br>Germany<br><br><br>------------------------------<br><br>Message: 8<br>Date: Sun, 18 Dec 2005 17:00:22 +0100<br>From: Lennart Regebro <<a href="mailto:regebro@gmail.com">
regebro@gmail.com</a>><br>Subject: Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)<br>To: Jan-Ole Esleben <<a href="mailto:esleben@gmail.com">esleben@gmail.com</a>><br>Cc: zope user list <<a href="mailto:zope@zope.org">
zope@zope.org</a>><br>Message-ID:<br> <<a href="mailto:319e029f0512180800gb6d7fa8hac21ad01c8d3c2a0@mail.gmail.com">319e029f0512180800gb6d7fa8hac21ad01c8d3c2a0@mail.gmail.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1
<br><br>On 12/18/05, Jan-Ole Esleben <<a href="mailto:esleben@gmail.com">esleben@gmail.com</a>> wrote:<br>> > > To simplify, in ZOPE, for any given product, during a<br>> > > transaction the product is effectively locked.
<br>> > This statement is incorrect.<br>><br>> You're right. It should be "during any transaction where there are<br>> potential changes to the object".<br><br>No, this statement is still correct. Replace "product" with "object"
<br>and you are right.<br><br>> And I agree, it's actually a lot more complicated than I'd thouht at first.<br><br>Or simpler. ;-)<br><br>> but it happens under rather magical circumstances. I have an example<br>> where it actually happens; this is code from a product that is
<br>> instantiated twice, one of those instances called TPCDest, the other<br>> TestPChanged; the method called directly is "TestPChanged.test()":<br>><br>> security.declareProtected("Use TestPChanged", "test_internal")
<br>> def test_internal(self, args=None, args2=None):<br>> "Called by test via XML-RPC"<br>> if args2:<br>> self.a.append(1)<br>> self._p_changed = 1<br>> if not args:
<br>> import xmlrpclib<br>> s = xmlrpclib.ServerProxy("<a href="http://USER:PASSWORD@localhost:8080/">http://USER:PASSWORD@localhost:8080/</a>",<br>> allow_none=True)<br>>
s.TestPChanged.test_internal(1)<br>> return self.a<br>><br>> security.declareProtected("Use TestPChanged", "test")<br>> def test(self, args2=None):<br>> "Called directly via ZOPE"
<br>> if args2:<br>> self.a.append(1)<br>> self._p_changed = 1<br>> import xmlrpclib<br>> s = xmlrpclib.ServerProxy("<a href="http://USER:PASSWORD@localhost:8080/">http://USER:PASSWORD@localhost:8080/
</a>",<br>> allow_none=True)<br>> return s.TPCDest.test_internal()<br>><br>> Zope obviously looks at the code, because if you remove the "if args2"<br>> (which is _never_ true), then a ConflictError happens.
<br>><br>> Maybe I'm stupid, but could someone point out _where_ exactly I am?<br><br>I don't understand the question. I would like to point out that you<br>set self._p_changed even when you don't change anything. :-)
<br><br>It seems to me that you say that if you process calls test and another<br>calls test_internal, you get a conflict error. This is correct, and as<br>noted before, that code would create a conflict in any type of<br>
environment. If you have two processes trying to modify the same<br>dataset, which is what your example seems to do, then you get a<br>conflict.<br><br>What you claim, is that if you have two processes in Zope change two<br>
different datasets, you get a conflict. That statement is still false.<br><br>> > Yes. You said "different sets of data". That reasonably means<br>> > different objects. If it doesn't, yuo need to take a long hard look at
<br>> > your object hierarchy.<br>><br>> Simply not true. What if I have a field titles (that is a hash of<br>> titles to Book objects)<br>> and a field comments (that is an array of comments on the library)? Is
<br>> that so obviously<br>> not a sane example?<br><br>Yes, sorry, having non-persistent aware dictionaries or arrays, and<br>then complaining that you have problems with persitency...<br><br>> > > In ordinary systems, you would have to find a way to store the
<br>> > > data and retrieve it, thus having a model that isn't implicit and<br>> > > entangled with your code.<br>> ><br>> > What is implicit with it?<br>><br>> See the example for some major implicitness.
<br><br>What is implicit with it?<br><br>> It's also implicit<br>> because you have no control over what a transaction considers a<br>> tainted object. (You have no real control over the transaction).<br><br>Thats still not true.
<br><br>> I am explicitly talking about changing different sets of data within<br>> the same object. You noted that above yourself.<br><br>Then these different sets should be different objects, and the object<br>should be an object container: Problem solved.
<br><br>> > You claim that you can't control what a persistent class store. That is false.<br>><br>> I don't. I say that if I want to avoid such problems as I describe<br>> altogether, I cannot store anything in a persistent class and thus
<br>> lose most of what makes ZOPE so interesting.<br><br>This is still not correct.<br><br>> > You claim that things get locked that shouldn't be locked in Zope. It<br>> > is not clear to me why you say that.
<br>><br>> See the example.<br><br>I don't see how the example examplifies this.<br><br><br>It is obvious to me that you have misunderstood something. I don't<br>know what yet, though.<br><br>--<br>Lennart Regebro, Nuxeo
<a href="http://www.nuxeo.com/">http://www.nuxeo.com/</a><br>CPS Content Management <a href="http://www.cps-project.org/">http://www.cps-project.org/</a><br><br><br>------------------------------<br><br>Message: 9<br>
Date: Sun, 18 Dec 2005 17:25:15 +0100<br>From: Jan-Ole Esleben <<a href="mailto:esleben@gmail.com">esleben@gmail.com</a>><br>Subject: Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)<br>To: Lennart Regebro <
<a href="mailto:regebro@gmail.com">regebro@gmail.com</a>><br>Cc: zope user list <<a href="mailto:zope@zope.org">zope@zope.org</a>><br>Message-ID: <<a href="mailto:3756d9750512180825u35fd6eb9o@mail.gmail.com">3756d9750512180825u35fd6eb9o@mail.gmail.com
</a>><br>Content-Type: text/plain; charset=ISO-8859-1<br><br>> > but it happens under rather magical circumstances.<br><br>That's my problem. Can you, from the ZOPE documentation, predict that<br>the example below will cause a ConflictError? It doesn't if you alter
<br>it only slightly! Please try!<br><br>> > security.declareProtected("Use TestPChanged", "test_internal")<br>> > def test_internal(self, args=None, args2=None):<br>> > "Called by test via XML-RPC"
<br>> > if args2:<br>> > self.a.append(1)<br>> > self._p_changed = 1<br>> > if not args:<br>> > import xmlrpclib<br>> > s = xmlrpclib.ServerProxy("
<a href="http://USER:PASSWORD@localhost:8080/">http://USER:PASSWORD@localhost:8080/</a>",<br>> > allow_none=True)<br>> > s.TestPChanged.test_internal(1)<br>> > return self.a<br>
> ><br>> > security.declareProtected("Use TestPChanged", "test")<br>> > def test(self, args2=None):<br>> > "Called directly via ZOPE"<br>> > if args2:
<br>> > self.a.append(1)<br>> > self._p_changed = 1<br>> > import xmlrpclib<br>> > s = xmlrpclib.ServerProxy("<a href="http://USER:PASSWORD@localhost:8080/">http://USER:PASSWORD@localhost:8080/
</a>",<br>> > allow_none=True)<br>> > return s.TPCDest.test_internal()<br><br>> I don't understand the question. I would like to point out that you<br>> set self._p_changed even when you don't change anything. :-)
<br><br>I know. This is just example code. Just imagine that both methods<br>change completely unrelated sets of data in addition to not changing<br>self.a.<br><br>> It seems to me that you say that if you process calls test and another
<br>> calls test_internal, you get a conflict error.<br><br>It doesn't really in most cases. And of course I can see now where it<br>does in this instance, but this is based on Zope looking at the code,<br>determining that
self.a is changed before the _p_changed, and marking<br>the object tainted because of that.<br><br>> This is correct, and as<br>> noted before, that code would create a conflict in any type of<br>> environment. If you have two processes trying to modify the same
<br>> dataset, which is what your example seems to do, then you get a<br>> conflict.<br>> What you claim, is that if you have two processes in Zope change two<br>> different datasets, you get a conflict. That statement is still false.
<br><br>Actually, I don't think we're getting anywhere with this same<br>dataset/different dataset distinction. It wouldn't happen in a<br>database using application because there would be no transaction for<br>"self.a
". You see, nothing happens to it, so why would there be one?<br>This only happens when you mix your data with your code and have<br>implicit transactions handled by the server.<br><br>> Yes, sorry, having non-persistent aware dictionaries or arrays, and
<br>> then complaining that you have problems with persitency...<br><br>But that's part of my point: I need to go out of my way to circumvent<br>Python, and I need to be really careful, because using dicts and lists<br>
might still work. Nothing is enforced, and where it breaks is hard to<br>predict.<br><br>> > See the example for some major implicitness.<br>> What is implicit with it?<br><br>I explained this above. Transaction handling in Zope (someone else
<br>pointed that out in this thread), Zope looking at the code to<br>determine that self.a has changed (which isn't really documented<br>anywhere obvious).<br><br>> > > You claim that things get locked that shouldn't be locked in Zope. It
<br>> > > is not clear to me why you say that.<br>> > See the example.<br>> I don't see how the example examplifies this.<br><br>I have tried to make it a little clearer in this message.<br><br>> It is obvious to me that you have misunderstood something. I don't
<br>> know what yet, though.<br><br>I think we might be misunderstanding each other because we both place<br>different value on implicitness and explicit design of data inside<br>code. I am mostly talking about what is, pragmatically, good
<br>programming and a supportive environment.<br><br>Ole<br><br><br>------------------------------<br><br>_______________________________________________<br>Zope maillist - <a href="mailto:Zope@zope.org">Zope@zope.org</a>
<br><br><br><br>End of Zope Digest, Vol 19, Issue 24<br>************************************<br></blockquote></div><br>