Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 82329 invoked by uid 500); 19 Jun 2003 09:21:34 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 82316 invoked from network); 19 Jun 2003 09:21:34 -0000 Received: from anchor-post-39.mail.demon.net (194.217.242.80) by daedalus.apache.org with SMTP; 19 Jun 2003 09:21:34 -0000 Received: from media.demon.co.uk ([80.177.14.141]) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 19Svc2-0006w7-0U for cocoon-dev@xml.apache.org; Thu, 19 Jun 2003 10:21:46 +0100 Date: Thu, 19 Jun 2003 10:21:45 +0100 Subject: Re: Hibernate sessions (was Re: [vote results] FOM) Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Jeremy Quinn To: cocoon-dev@xml.apache.org Content-Transfer-Encoding: 7bit In-Reply-To: <3EF16426.3010906@cbim.it> Message-Id: <7239211D-A237-11D7-99B8-0003935AD2EE@media.demon.co.uk> X-Mailer: Apple Mail (2.552) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Thursday, June 19, 2003, at 08:20 AM, Ugo Cei wrote: > Jeremy Quinn wrote: >> is that: >> var session = Package.package.name.Persistence.getSession(); ? > > Yep. Phew ;) >> Would you do something like this, if you wanted to use Transactions? : > > Yes. What's important is that you must perform your transaction in the > scope of a single HTTP request, otherwise you'll have to use another > strategy. Yes, OK, no great hardship. >> Would you consider doing something like the above from inside a >> sendView validation function, adding a violation if you had to roll >> back? > > Haven't thought about it. > >> By what I understand now ..... what I require is the Persistence >> class from the page you sent me and a configuration to add to >> web.xml. What I am not sure I understand is what that configuration >> should be. > > First of all, you need a Servlet 2.3 compliant container. Recent > versions of Jetty or Tomcat are OK. Good > Then you need to patch Cocoon's web.xml file to refer to the 2.3 DTD: That's a step I would have missed!! > As far as JNDI is concerned, I've removed all JNDI code from my > Persistence class and simplified it a little. AH HA! That was freaking me ..... "gosh it looks like it's doing something really important, and I don't understand any of it!!!" > I'm sending you privately the class. Very kind of you regards Jeremy