Return-Path: Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 28351 invoked by uid 500); 15 Jul 2003 09:50:03 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 28336 invoked from network); 15 Jul 2003 09:50:03 -0000 Received: from imap.gmx.net (HELO mail.gmx.net) (213.165.64.20) by daedalus.apache.org with SMTP; 15 Jul 2003 09:50:03 -0000 Received: (qmail 5140 invoked by uid 65534); 15 Jul 2003 09:50:15 -0000 Received: from chello062178239020.5.15.vie.surfer.at (EHLO WRPO) (62.178.239.20) by mail.gmx.net (mp007) with SMTP; 15 Jul 2003 11:50:15 +0200 Reply-To: From: =?iso-8859-1?Q?Reinhard_P=F6tz?= To: Subject: RE: Flow Database stuff ( The new FOM? ) Date: Tue, 15 Jul 2003 11:50:26 +0200 Message-ID: <002c01c34ab6$85314d90$1e01a8c0@WRPO> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <3C8863F5-B6A8-11D7-9809-0003935AD2EE@media.demon.co.uk> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N From: Jeremy Quinn [mailto:jeremy@media.demon.co.uk]=20 >=20 > On Tuesday, July 15, 2003, at 08:28 AM, Christopher Oliver wrote: >=20 > > Reinhard P=F6tz wrote: > > > >> From: Christopher Oliver [mailto:res1cf5x@verizon.net] > > > > > >> > >>> catch (break) { > >>> // a continuation is being captured, =20 > // code to=20 > >>> handle that goes here > >>> releaseSession(); > >>> } > >>> > >> > >> ... and this is called after the pipeline has been=20 > processed? How is=20 > >> this possible from a technical POV? If the view layer is called by=20 > >> sendPageAndWait the flow interpreter isn't active until=20 > the response=20 > >> returns from the client (map:call continuation=3D"..."). > >> > >> Reinhard > >> > > Unfortunately, you're right. In this case the call to=20 > releaseSession() > > is made when the continuation is created - which is before the view=20 > > layer is called (see fom_system.js). > > > > I've just commited an update to Rhino that [re-]enables a further > > syntax extension, namely: > > > > catch (return) { > > // This continuation is about to be replaced with another > > continuation > > // code to handle that goes here > > } > > > > By placing the code to release the hibernate session inside, i.e. > > > > catch (return) { > > cocoon.releaseComponent(hibSession); > > } > > > > you get the effect you're looking for: namely that the session is > > released after calling the view layer but before control leaves the=20 > > interpreter. > > > > As I said, Ovidiu and I decided to put these features in to try to > > provide the functionality provided by dynamic-wind in=20 > Scheme, but this=20 > > kind of explicit resource management seems awkard and error-prone. >=20 > Thanks Chris >=20 > I think I will stick with the TomCat Filter technique at the=20 IIRC filters are part of the servlet spec, aren't they? > moment, I=20 > am struggling to see the advantage of using=20 > cocoon.***Component() stuff=20 > in this situation to be honest. In this case it's a matter of taste. But I will do some research with the alternative implementation by Chris. Cheers, Reinhard