I am using version 3 - 8. <br><br><div class="gmail_quote">2010/9/11 Boris Popov, DeepCove Labs (SNN) <span dir="ltr">&lt;<a href="mailto:boris@deepcovelabs.com">boris@deepcovelabs.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><font size="2" color="navy" face="Arial">
Which version of Seaside-Glorp are you using? It works fine on VisualWorks w/o spawning new Glorp sessions.<br>
<br>-Boris (via BlackBerry)</font></div>
<br><div><hr size="2" width="100%" align="center">
<font face="Tahoma" size="2">
<b>From</b>: <a href="mailto:seaside-bounces@lists.squeakfoundation.org" target="_blank">seaside-bounces@lists.squeakfoundation.org</a> &lt;<a href="mailto:seaside-bounces@lists.squeakfoundation.org" target="_blank">seaside-bounces@lists.squeakfoundation.org</a>&gt;
<br><b>To</b>: Seaside - general discussion &lt;<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a>&gt;
<br><b>Sent</b>: Sat Sep 11 04:12:04 2010<br><b>Subject</b>: Re: [Seaside] Re: Glorp Sessions in ajax requests
<br></font><br></div><div><div></div><div class="h5">
To bad I can&#39;t make it to Barcalona this yeah... I&#39;ll bet you all have a great time over there! Next year i&#39;ll definitly be at esug and / or Vegas :)<div><br></div><div>I will dedicate this weekend for getting Glorp sessions be maintained over a WASession. </div>

<div><br></div><div>@Sven, I will use you reddit application as a blue print and publish my findings over the weekend.</div><div><br></div><div>Regards,</div><div><br></div><div>Bart</div><div><div><div><br><br><div class="gmail_quote">

2010/9/10 Alan Knight <span dir="ltr">&lt;<a href="mailto:knight@acm.org" target="_blank">knight@acm.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>
<font size="3">In general, if you&#39;ve got objects from different sessions,
then yes, you&#39;re going to have to read it for the current session, or
fake around it in interesting ways. It seems like the issue is why you&#39;re
getting a different Glorp session for each Ajax request. I haven&#39;t looked
at the details of the code, but I&#39;m guessing that the mode it&#39;s operating
in is that each http request is getting a separate glorp session and
releasing it back to the pool again immediately, or just discarding it,
and when an ajax request comes in it&#39;s being treated as a separate
request, and getting a new session. So what you&#39;d want to do is keep the
Glorp session associated with the Seaside session, and re-use it for each
request that comes in. You&#39;d presumably want to make sure you&#39;re pooling
the underlying database connections then, but that&#39;s fine. The details of
that, and whether the framework already lets you do that are left as an
exercise to the reader, as I&#39;m in Barcelona enjoying myself prior to the
start of ESUG :-) <br><div><div></div><div><br>
At 02:27 PM 2010-09-10, Bart Veenstra wrote:<br>
<blockquote type="cite">And another thing is bugging me
during the development.<br><br>
How do I cope with glorp objects that are stored in a WAComponent, like
the current user, and use that when I update other glorp objects. It
keeps pushing me a DuplicatePrimaryKeyException because the object is not
in the current session. I need to reinstantiate the current user in the
session with a database lookup, before I can use it again...<br><br>
So, How to properly mix glorp objects coming from different sessions?
This could be resolved, if the glorpFilter stays put in the WASession in
each ajax request. <br><br>
Should I drop the glorp filter and put the glorp session in the WASession
properties instance variable?<br><br>
Regards,<br><br>
Bart<br><br>
<br><br>
2010/9/10 Bart Veenstra
&lt;<a href="mailto:bart.veenstra@gmail.com" target="_blank">bart.veenstra@gmail.com</a>
&gt;<br>
</blockquote></div></div></font><div><div></div><div>
<dl>
<dd>Hi,<br><br>

</dd><dd>I am working on an Ajax heavy application with Glorp as my mapping
framework. I use the Glorp filter to assign a glorpSession to my database
objects. This works pretty well, but it seems that for each request
within the same session (like an jQuery ajax callback) a new GlorpSession
is created. <br><br>

</dd><dd>When removing all sessions using WAAdmin clearAll, the Glorp Sessions
still remain in the memory, (Checked with GlorpSession
allInstances).<br><br>

</dd><dd>Should I worry about this? And how do I get rid of the GlorpSessions?
<br><br>

</dd><dd>I tried GlorpSession allInstances do: [:each | each become:nil ] but
the object is immutable...<br><br>

</dd><dd>Using VW 77 with the latest seaside from the public
repository.<br><br>

</dd><dd>Regards,<br><br>

</dd><dd><font size="3" color="#888888">Bart Veenstra<br>
</font><br>

</dd></dl><br></div></div><div>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
</div></div><font color="#888888">
<br>
<div>--</div>
<div>Alan Knight [|], Engineering Manager, Cincom Smalltalk</div>
<div><a href="mailto:knight@acm.org" target="_blank">knight@acm.org</a></div>
<div><a href="mailto:aknight@cincom.com" target="_blank">aknight@cincom.com</a></div>
<div><a href="http://www.cincom.com/smalltalk" target="_blank">
http://www.cincom.com/smalltalk</a></div>

</font><br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div></div></div>
</div></div><br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br>