Servlet filters would be way to go for this particular situation: http://www.hibernate.org/43.html
HTH. ATTA On 6/25/05, Ashraf Fouad <[EMAIL PROTECTED]> wrote: > I'm openning a hibernate session for each request, so I want to close this > after rendering data in JSP, as usually the objects are lazy loaded so if I > closed the hibernate session, it will give execptions in page, so I need to > keep it alive with me till the end of data rendering then close this after > execution, I already have code using the servlet filter, but I think better > do it cleaner way as struts may open this for customization. > > On 6/25/05, Martin Gainty <[EMAIL PROTECTED]> wrote: > > > > what are you 'cleaning' up? > > session data? > > entity data? > > context data? > > > > Martin > > > > > > > > > > > > >From: Ashraf Fouad <[EMAIL PROTECTED]> > > >Reply-To: Ashraf Fouad <[EMAIL PROTECTED]> > > >To: user@struts.apache.org > > >Subject: Making cleaning after forwarding to page > > >Date: Sat, 25 Jun 2005 16:55:30 +0300 > > >MIME-Version: 1.0 > > >Received: from mail.apache.org <http://mail.apache.org> > > >([209.237.227.199<http://209.237.227.199>]) > > by mc3-f2.hotmail.com <http://mc3-f2.hotmail.com> > > >with Microsoft SMTPSVC(6.0.3790.211); Sat, 25 Jun 2005 06:55:45 -0700 > > >Received: (qmail 9390 invoked by uid 500); 25 Jun 2005 13:55:33 -0000 > > >Received: (qmail 9377 invoked by uid 99); 25 Jun 2005 13:55:33 -0000 > > >Received: from asf.osuosl.org <http://asf.osuosl.org> (HELO > > asf.osuosl.org <http://asf.osuosl.org>) > > (140.211.166.49<http://140.211.166.49>) > > by > > >apache.org <http://apache.org> (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun > > 2005 06:55:33 -0700 > > >Received: pass (asf.osuosl.org <http://asf.osuosl.org>: domain of > > [EMAIL PROTECTED] designates > > >64.233.162.204 <http://64.233.162.204> as permitted sender) > > >Received: from [64.233.162.204 <http://64.233.162.204>] (HELO > > zproxy.gmail.com <http://zproxy.gmail.com>) > > (64.233.162.204<http://64.233.162.204> > > ) > > >by apache.org <http://apache.org> (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun > > 2005 06:55:33 -0700 > > >Received: by zproxy.gmail.com <http://zproxy.gmail.com> with SMTP id > > 13so47322nzn for > > ><user@struts.apache.org>; Sat, 25 Jun 2005 06:55:30 -0700 (PDT) > > >Received: by 10.36.65.19 <http://10.36.65.19> with SMTP id > > n19mr3077494nza; Sat, 25 Jun > > >2005 06:55:30 -0700 (PDT) > > >Received: by 10.36.5.4 <http://10.36.5.4> with HTTP; Sat, 25 Jun 2005 > > 06:55:30 -0700 (PDT) > > >X-Message-Info: 6sSXyD95QpWvdDEghuU2CbVkYjl4MalRVurl1qmjVTE= > > >Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > > >Precedence: bulk > > >List-Unsubscribe: <mailto:[EMAIL PROTECTED]> > > >List-Help: <mailto:[EMAIL PROTECTED]> > > >List-Post: <mailto:user@struts.apache.org> > > >List-Id: "Struts Users Mailing List" > > ><user.struts.apache.org<http://user.struts.apache.org> > > > > > >Delivered-To: mailing list user@struts.apache.org > > >X-ASF-Spam-Status: No, hits=0.3 > > >required=10.0tests=HTML_10_20,HTML_MESSAGE,RCVD_BY_IP > > >X-Spam-Check-By: apache.org <http://apache.org> > > >DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; > > >d=gmail.com <http://gmail.com>; > > > > >h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; > > > > > > > >b=Yu5YIO99TiBf/Z2nl6LyNuQfFjQA5MHHQBkXXpVE/pqCSDrSyCVZT1OW2fG0KLUaxTPG+qcxTLyjvQhRHU1nbDVzUVROfxAqCf8yxWRT1JF6O123Iy769tcv/l9aSBbOStP1GM46H+fIOCedNsY8gOz9HlG2pGL/w0i+SC+w4nY= > > >X-Virus-Checked: Checked by ClamAV on apache.org <http://apache.org> > > >Return-Path: [EMAIL PROTECTED] > > >X-OriginalArrivalTime: 25 Jun 2005 13:55:45.0533 (UTC) > > >FILETIME=[957DDAD0:01C5798D] > > > > > >Dears, > > >I want to know where to customize in struts 1.2.7 inorder to make some > > >cleanup after the request is frowarded to the jsp page, something like > > >servlet filter. > > > As I already have RequestProcessor.processPreProcess to handle an any > > >request before forwarding to action class, I need some way to make > > cleanup > > >for after the JSP has been populated by data. > > > The purpose of this is to handle the cleanup of Hibernate by closing it. > > > > > >-- > > >Thanks, best regards, > > >Ashraf Fouad > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Thanks, best regards, > Ashraf Fouad > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]