Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 92309 invoked from network); 14 Apr 2005 19:17:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Apr 2005 19:17:21 -0000 Received: (qmail 16485 invoked by uid 500); 14 Apr 2005 19:17:12 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 16440 invoked by uid 500); 14 Apr 2005 19:17:11 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 16427 invoked by uid 99); 14 Apr 2005 19:17:11 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from ns1.solarwinds.com (HELO ns1.solarwinds.com) (204.244.227.2) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 14 Apr 2005 12:17:11 -0700 Received: from [192.168.12.22] (S010600501825e33b.nb.shawcable.net [24.65.185.106]) (authenticated bits=0) by ns1.solarwinds.com (8.12.11/8.12.11) with ESMTP id j3EJH7Ld024575 for ; Thu, 14 Apr 2005 12:17:08 -0700 (MST) Message-ID: <425E98A8.1010702@kismetsoftware.com> Date: Thu, 14 Apr 2005 12:22:00 -0400 From: JD Daniels User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: Using Hibernate via Java, not Flow References: <9a27dace05041313374dd95ecd@mail.gmail.com> <425D83C8.9090201@apache.org> <9a27dace05041313586f08910d@mail.gmail.com> <425D893B.9050802@mobilebox.pl> <9a27dace05041314126ea839ea@mail.gmail.com> <425D96FD.4000301@egonet.pl> <9a27dace050414063922a8e074@mail.gmail.com> <425EBC9F.2000803@egonet.pl> In-Reply-To: <425EBC9F.2000803@egonet.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I didn't see the need for a cocoon component. I looked again, but still can't find the article that got me going... basically here is my setup: web.xml: contextConfigLocation WEB-INF/ApplicationContext.xml OpenSessionInViewFilter org.springframework.orm.hibernate.support.OpenSessionInViewFilter singleSession false OpenSessionInViewFilter /* org.springframework.web.context.ContextLoaderListener Applicationcontext.xml: com.mysql.jdbc.Driver jdbc:mysql://dbplace.com/db dbuser dbpas com/kismetsoftware/authenticator/model/User.hbm.xml com/kismetsoftware/authenticator/model/Role.hbm.xml net.sf.hibernate.dialect.MySQLDialect PROPAGATION_REQUIRED PROPAGATION_REQUIRED PROPAGATION_REQUIRED PROPAGATION_REQUIRED PROPAGATION_REQUIRED So in flow, you just get a handle on the service beans, which handle all the work, and lazy initialization is no longer an issue. JD Jakub Kaniewski wrote: > Brent Johnson wrote: > >> I searched the Wiki for "servletfilter", "servlet-filter", "servlet >> filter" and didn't find anything. Is there an example of closing >> Hibernate sessions using a servlet filter on the Wiki? >> >> > Here is the wiki article I mentioned before - > http://wiki.apache.org/cocoon/CocoonAndHibernateTutorial?highlight=%28Hibernate%29 > > > J.K. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org