Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 88227 invoked from network); 11 Apr 2005 09:23:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Apr 2005 09:23:17 -0000 Received: (qmail 37388 invoked by uid 500); 11 Apr 2005 09:23:06 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 37166 invoked by uid 500); 11 Apr 2005 09:23:05 -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 37152 invoked by uid 99); 11 Apr 2005 09:23:05 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of melowe@gmail.com designates 64.233.184.207 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.207) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 11 Apr 2005 02:23:03 -0700 Received: by wproxy.gmail.com with SMTP id 71so1482678wri for ; Mon, 11 Apr 2005 02:23:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=lGSuST2hWpS3rMiKZIa2tm6xMpQ41R0ieSQeX1s1KvJgE6QdPMxRhWbq1lle5ExShT1jFCvWzY1qikzi4GlnvyTqnsnsTDHCs7ssaD+2IfOj29NH6ZNsP8AW8KdQRH0uXx1ceKu3lmKl3sPBdEqC51Czb3BnQzyPoO1VHP92ktU= Received: by 10.54.31.61 with SMTP id e61mr224676wre; Mon, 11 Apr 2005 02:23:02 -0700 (PDT) Received: by 10.54.69.1 with HTTP; Mon, 11 Apr 2005 02:23:02 -0700 (PDT) Message-ID: <3e1257da0504110223681e2883@mail.gmail.com> Date: Mon, 11 Apr 2005 11:23:02 +0200 From: Mark Lowe Reply-To: Mark Lowe To: users@cocoon.apache.org Subject: Re: Re[2]: Cocoon, Hibernate and HSQL In-Reply-To: <3e1257da0504101508339840b5@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <425771DC.7060604@apache.org> <4257E748.4000907@gmx.de> <1671737929.20050409175716@op.pl> <3e1257da0504101508339840b5@mail.gmail.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I've just taken a look at the hibernte, cocoon, spring petstore. Looks like it does precisely what I was saying.. Getting the appContext in flow script seems obvious now I've seen it done.. Mark On Apr 11, 2005 12:08 AM, Mark Lowe wrote: > If you want to start the DB with the webapplication then i can think > of worse things than simply having a DBServer.init() which would also > allow you to configure parameters in web.xml. Thats about as closely > as you'd want to couple cocoon to the DB. I'm not sure if HSQLDB > supported transactions, but should be okay for read access apps. Its > possible that the hibernate wrappers for the JDBC calls report that > transactions are working, when the db will tell you otherwise, this is > the case with mysql when using myisam table engine (depends on who > wrote the jdbc driver). > > On hibernate. > I'm not sure how you access the application context in flowscript (if > thats a problem, I have a feeling that only the cocoon servlet context > would be avialiable in flowscript), but i'd look around at any notes > on intgregrating spring with cocoon. This would give you a very clean > separation, spring makes light work of hibernate, the spring servlet > places any configured services (means of accessing your hibernated > objects) and then the trick would just be getting the services in your > view (in this case cocoon). This would mean no need to have db > configuration in your view resources (cocoon.xconf etc), but rather in > spring. > > I'd have a look for one of the numberous examples on hibernate and > spring, and then look for folk who have used spring with cocoon. It > must be doable. > > "The Hibernate builtin connection pool is for testing purposes only. It > might work on some databases, but I definately saw it break on MySQL > when leaving it running overnight." > > Regarding the connection pooling breaking on mysql, this could be the > mysql driver rather than the hibernate's default pooling (commons dbcp > i believe, although not entirly sure). There were a few pesky drivers > around with mysql that where causing strife for a while. I've used > hibernate with mysql and postgres without issue (other than the weeks > tracking down the jdbc issue), both with spring and a more standard > hibernate way. > > Mark > > > On Apr 9, 2005 5:57 PM, Grzegorz Sikora wrote: > > Hello Sebastien, > > > > Saturday, April 9, 2005, 4:42:04 PM, you wrote: > > > > SA> - What is the URL of my HSQLDB database ? > > SA> - How can I configure it to tell him for example where to put its files ? > > SA> I know I can find information about that in HSQLDB documentation but > > SA> here as I'd like my database to be embedded in my web application, I > > SA> guess there is somewhere in Cocoon where I have to add code to > > SA> initialize it when Cocoon is started... > > SA> Any ideas ? Or at least has somebody already successfully used that > > SA> configuration ? > > > > Search for hsqldb-server tag and datasources tag both in > > cocoon.xconf. > > > > -- > > Best regards, > > Grzegorz Sikora > > > > > > --------------------------------------------------------------------- > > 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