rootFolder is a class or factory to create a rootfolder, but this is just an applicative root folder with a specific interface, just a convention. The zodb root object is a different object which is always present when you open an empty zodb, and that you&#39;ll be able to access with IDatabaseOpenedWithRoot event.<br><br>If you want to retrieve the root object or any possible rootFolder, you can use some hooks such as getSite or getRoot, I don&#39;t remember where they are<br><br>Christophe<br><br>----- Reply message -----<br>De : &quot;Jim Pharis&quot; &lt;binbrain@gmail.com&gt;<br>Date : mer., juin 30, 2010 23:05<br>Objet : [BlueBream] can&#39;t persist<br>Pour : &quot;Christophe Combelles&quot; &lt;ccomb@free.fr&gt;<br>Cc : &lt;bluebream@zope.org&gt;<br><br><br>So I&#39;m mistaken about the purpose of the rootFolder method then. However, I<br>can&#39;t really use the IDataOpenedWithRootEvent cleanly because I don&#39;t want<br>the root obj when the connection is opened, I want it later. Therefore,<br>getting at the root obj still isn&#39;t real obvious to me in this situation.<br><br>On Wed, Jun 30, 2010 at 4:06 PM, Christophe Combelles &lt;ccomb@free.fr&gt; wrote:<br><br>&gt; Le 30/06/2010 21:47, Jim Pharis a écrit :<br>&gt; &gt; No, I don&#39;t see the changes. Maybe I should be more specific about what<br>&gt; &gt; I&#39;m doing.<br>&gt; &gt;<br>&gt; &gt; I have an AdminUtility registered with the below method that I call from<br>&gt; &gt; a view. If I inspect the root object after that method exists newsite<br>&gt; &gt; isn&#39;t in there.<br>&gt; &gt;<br>&gt; &gt; from zope.site.folder import rootFolder<br>&gt; &gt; def install(self)<br>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;newsite = NewSite()<br>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;newsite.setSiteManager(LocalSiteManager(newsite))<br>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;root = rootFolder()<br>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;import pdb; pdb.set_trace()<br>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;root[&#39;newsite&#39;] = newsite<br>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;root._p_changed = True<br>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;transaction.commit()<br>&gt;<br>&gt;<br>&gt; You&#39;re creating a root object in a local variable, and this variable is<br>&gt; destroyed at the end of the function. You should retrieve the root instead<br>&gt; of<br>&gt; creating it, since an empty ZODB always has a root object.<br>&gt;<br>&gt;<br>&gt; <a href="http://bluebream.zope.org/doc/1.0/faq.html#how-do-i-automatically-create-some-needed-object-at-application-startup">http://bluebream.zope.org/doc/1.0/faq.html#how-do-i-automatically-create-some-needed-object-at-application-startup</a><br>&gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; On Wed, Jun 30, 2010 at 3:11 PM, Christophe Combelles &lt;ccomb@free.fr<br>&gt; &gt; &lt;mailto:ccomb@free.fr&gt;&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; &nbsp; &nbsp; Le 30/06/2010 20:31, Jim Pharis a écrit :<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; I&#39;m trying out BlueBream 1.0b2 and I&#39;m running into a problem with<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; Persistent objects. The installation is pretty out of the box at<br>&gt; this<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; point. When I use .\bin\paster shell debug.ini I seem to be able<br>&gt; to<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; create Persistent objects and transaction.commit and changed<br>&gt; &gt; &nbsp; &nbsp; objects are<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; properly committed. However, when I start using either<br>&gt; .\bin\paster<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; serve debug.ini or .\bin\paster serve deploy.ini, no matter what<br>&gt; &gt; &nbsp; &nbsp; I do to<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; Persistent objects transaction.commit() returns None. I noticed<br>&gt; that<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; even if I directly set obj._p_changed=1 it doesn&#39;t work, and if I<br>&gt; &gt; &nbsp; &nbsp; look<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; at _p_changed right away, I see its been reverted back to False.<br>&gt; &gt; &nbsp; &nbsp; What am<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; I doing wrong here?<br>&gt; &gt;<br>&gt; &gt; &nbsp; &nbsp; Hi!<br>&gt; &gt;<br>&gt; &gt; &nbsp; &nbsp; transaction.commit() is not supposed to return anything, don&#39;t you<br>&gt; &gt; &nbsp; &nbsp; see the<br>&gt; &gt; &nbsp; &nbsp; changes in your application after ending the debug session and<br>&gt; &gt; &nbsp; &nbsp; returning to the<br>&gt; &gt; &nbsp; &nbsp; paster serve ?<br>&gt; &gt;<br>&gt; &gt; &nbsp; &nbsp; Christophe<br>&gt; &gt;<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; TIA,<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; - Jim<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; _______________________________________________<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; bluebream mailing list<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; bluebream@zope.org &lt;mailto:bluebream@zope.org&gt;<br>&gt; &gt; &nbsp; &nbsp; &nbsp;&gt; <a href="https://mail.zope.org/mailman/listinfo/bluebream">https://mail.zope.org/mailman/listinfo/bluebream</a><br>&gt; &gt;<br>&gt; &gt; &nbsp; &nbsp; _______________________________________________<br>&gt; &gt; &nbsp; &nbsp; bluebream mailing list<br>&gt; &gt; &nbsp; &nbsp; bluebream@zope.org &lt;mailto:bluebream@zope.org&gt;<br>&gt; &gt; &nbsp; &nbsp; <a href="https://mail.zope.org/mailman/listinfo/bluebream">https://mail.zope.org/mailman/listinfo/bluebream</a><br>&gt; &gt;<br>&gt; &gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; bluebream mailing list<br>&gt; bluebream@zope.org<br>&gt; <a href="https://mail.zope.org/mailman/listinfo/bluebream">https://mail.zope.org/mailman/listinfo/bluebream</a><br>&gt;<br><br><br>