It writes and reads objects in the session, maybe the probleme comes from here ? Here&#39;s a little sinppet :<br><br>&nbsp;&nbsp;&nbsp; def toutCompter(self):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;<br>&nbsp;&nbsp;&nbsp; xmlrpc methode, called from a web borwser.
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; documentXML = ComptageXML()<br>&nbsp;&nbsp;&nbsp; #this reads and writes objects in the session<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dicoLignes&nbsp; = self._fabriquerDicoLignes()<br>&nbsp;&nbsp;&nbsp; #do things with dicoLignes<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for inumLigneCourante in xrange(borneInf,borneSup) :
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; snumLigneCourante = str(inumLigneCourante)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ligne = dicoLignes[snumLigneCourante][&quot;requete&quot;]<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #do things here<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self._ajouterAuDico(snumLigneCourante,ligne,comptage,arbre)
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ligne :<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self._mettreEnSession(resultats)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; response = self.REQUEST.RESPONSE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; response.setHeader(&quot;Content-Type&quot;,&quot;text/xml&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; response.setHeader
(&quot;charset&quot;,&quot;utf-8&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chaineXML = documentXML.formatXML()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print &quot;sending results to &quot;+addresseIP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return chaineXML<br><br>&nbsp;&nbsp;&nbsp; def _fabriquerDicoLignes(self):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; formulaire = self.getForm()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dicoLignes = self.getSession(self,&quot;dicoLignes&quot;) or {}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for key in formulaire.keys():<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #do things...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.setSession(&quot;dicoLignes&quot;, dicoLignes)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return dicoLignes<br><br>&nbsp;&nbsp;&nbsp; def _fabriquerListeLignes(self):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dicoLignes = RacineAbstraite.getSession(self,&quot;dicoLignes&quot;) or {}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listeNumeros = dicoLignes.keys()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; listeNumeros.sort
( lambda x,y: cmp(int(x), int(y)) )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return [ dicoLignes[str(inumeroLigne)][&quot;requete&quot;] for inumeroLigne in \<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sorted( [int(snumeroLigne) for snumeroLigne in dicoLignes.keys()] ) ]<br>
<br>&nbsp;&nbsp;&nbsp; def _ajouterAuDico(self,p_snumeroCle,p_ligne,p_comptage,p_arbre):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dicoLignes = RacineAbstraite.getSession(self,&#39;dicoLignes&#39;) or {}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dicoLignes[p_snumeroCle]&nbsp; = {&#39;requete&#39;:p_ligne,&#39;comptage&#39;:p_comptage,&#39;arbre&#39;:p_arbre}
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.setSession(&#39;dicoLignes&#39;,dicoLignes)<br><br>&nbsp;&nbsp;&nbsp; def _mettreEnSession(self,p_resultats):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mettre en session les résultats d&#39;un comptage.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Initialise de la SESSION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dicoResultatRecherche = {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;listeCriteres&#39;&nbsp;&nbsp;&nbsp;&nbsp; : [self._fabriquerListeLignes(), self.getForm(&#39;numeroLigne&#39;)],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;nombreEntreprises&#39; : p_resultats[0][0],
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;listeComptage&#39;&nbsp;&nbsp;&nbsp;&nbsp; : p_resultats,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;listeEntreprises&#39;&nbsp; : [],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #On conserve la requete et le resultat en session<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.setSession(&#39;resultatRecherche&#39;, p_dicoResultatRecherche.copy())
<br><br><br>When toutCompter is called by browser 1, then he will write and read, say, the dicoLignes object in the session.<br>When toutCompter is called by browser 2 parallely, is it the same dicoLignes object that it tries to access or another one is created ? can there be conflicts somehow ?
<br><br>Y.Chaouche<br><br><div><span class="gmail_quote">2007/1/19, yacine chaouche &lt;<a href="mailto:yacinechaouche@gmail.com">yacinechaouche@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I mean triple couples of lines of code.<br><br><div><span class="gmail_quote">2007/1/19, yacine chaouche &lt;<a href="mailto:yacinechaouche@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
yacinechaouche@gmail.com</a>&gt;:</span><div><span class="e" id="q_11039be1a78a2659_1"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The toutCompter methode does a lot of thing and it would take a triple couples of lines to describe what it does all.<br>Anyway, is there a way for me to detect ConflictErrors ? they don&#39;t appear on the console so i guess they are catched.
<br><br>Y.Chaouche<br><br><div><span class="gmail_quote">2007/1/19, Gabriel Genellina &lt;<a href="mailto:gagsl-zope@yahoo.com.ar" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">gagsl-zope@yahoo.com.ar
</a>&gt;:</span><div><span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At Thursday 18/1/2007 16:30, Andreas Jung wrote:<br><br><br>&gt;&lt;zope trace to the console&gt;<br>&gt;ip: <a href="http://10.75.49.155" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">10.75.49.155
</a> requests counting of lines 1 to 11<br>&gt;ip: <a href="http://10.75.49.51" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
10.75.49.51</a> requests counting of lines 1 to 11<br>&gt;sending results to <a href="http://10.75.49.155" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">10.75.49.155</a><br>&gt;sending results to 
<a href="http://10.75.49.51" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">10.75.49.51</a><br>&gt;ip: <a href="http://10.75.49.51" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">


10.75.49.51</a> requests counting of lines 1 to 11<br>&gt;sending results to <a href="http://10.75.49.51" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">10.75.49.51</a><br>&gt;&lt;/zope trace&gt;<br>

&gt;<br>&gt;<br>&gt;Zope says he got 2 requests form <a href="http://10.75.49.51" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
10.75.49.51</a> and sent it the results 2<br>&gt;times. Ok, let&#39;s check the tcpflow then for these supposed connections :<br>&gt;[...]<br>&gt;Allright, there is only ONE POST request. So zope didnt really got two<br>

&gt;requests. Now let&#39;s see if it sent the data two times as it presumes :
<br>&gt;[...]<br>&gt;The results were sent just one time, not two.<br>&gt;<br>&gt;What is going on here ?<br><br>What does the toutCompter method really does? Does it modify some<br>object state? That might provoke a ConflictError, forcing a
<br>transaction abort and the request to be re-tried (up to three times,<br>silently, then it goes logged).<br><br><br>--<br>Gabriel Genellina<br>Softlab SRL<br><br><br><br><br><br><br>__________________________________________________
<br>Preguntá. Respondé. Descubrí.<br>Todo lo que querías saber, y lo que ni imaginabas,<br>está en Yahoo! Respuestas (Beta).<br>¡Probalo ya!<br><a href="http://www.yahoo.com.ar/respuestas" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://www.yahoo.com.ar/respuestas
</a><br><br>_______________________________________________<br>Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Zope@zope.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Zope@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://mail.zope.org/mailman/listinfo/zope
</a><br>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br>(Related lists -<br> <a href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.zope.org/mailman/listinfo/zope-announce
</a><br> <a href="http://mail.zope.org/mailman/listinfo/zope-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br></blockquote></span></div></div><br>

</blockquote></span></div></div><br>

</blockquote></div><br>