Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 74288 invoked from network); 21 Oct 2009 00:18:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Oct 2009 00:18:31 -0000 Received: (qmail 72641 invoked by uid 500); 21 Oct 2009 00:18:30 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 72626 invoked by uid 500); 21 Oct 2009 00:18:30 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 72616 invoked by uid 99); 21 Oct 2009 00:18:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 00:18:30 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of siberian@siberian.org designates 209.85.216.185 as permitted sender) Received: from [209.85.216.185] (HELO mail-px0-f185.google.com) (209.85.216.185) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 00:18:22 +0000 Received: by pxi15 with SMTP id 15so3884956pxi.26 for ; Tue, 20 Oct 2009 17:18:00 -0700 (PDT) MIME-Version: 1.0 Sender: siberian@siberian.org Received: by 10.140.172.6 with SMTP id u6mr1631991rve.207.1256084280281; Tue, 20 Oct 2009 17:18:00 -0700 (PDT) In-Reply-To: <8f985b960910201710mec740b5x6f721895aa72497d@mail.gmail.com> References: <507377.53458.qm@web38908.mail.mud.yahoo.com> <8f985b960910201710mec740b5x6f721895aa72497d@mail.gmail.com> Date: Tue, 20 Oct 2009 17:18:00 -0700 X-Google-Sender-Auth: 2bd89687c8b61827 Message-ID: <479ffcd60910201718o7f64c4eat97aa8c09d65163b9@mail.gmail.com> Subject: Re: Cayenne and H2 on the desktop From: John Armstrong To: user@cayenne.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I implemented a DataSourceFactory to obtain this same functionality. specifically around having a single executable JAR and derby not finding its schema creation file. The DSF lets the system auto-detect schema existence and use embedded ant to create it as required. Your mileage may vary John- On Tue, Oct 20, 2009 at 5:10 PM, Mike Kienenberger wro= te: > Do you want the database to be a single-user resource which is > persisted between runs? > > If so, it should be as simple as using jdbc:h2:~/test/testdatabase as > your jdbc url where "~/test/cistestdatabase" is the path to your > database (it will be a directory). =A0Most likely, this is what you > want. > > Using jdbc:h2:tcp://localhost/~/test/testdatabase will connect as a > standard standalone database instance and assumes you started it > standalone. =A0 This is now multiuser. > > The list for technical questions is a google group. > > http://groups.google.com/group/h2-database > > > On Tue, Oct 20, 2009 at 8:00 PM, Eric Lazarus wr= ote: >> Folks >> >> Thanks for you folks direction on using H2 as our database but we are a = bit stuck on how to do it. We are moving toward using Cayenne 3.0M6 and H2 = for the desktop version of an application that should be as idiot proof as = possible. We want for the end user to not have to understand that there is = a database there at all. >> >> Any suggestions about how we should configure things? For example, shoul= d we configure H2 to run embedded if we don't want the end user to have to = be aware of it? How DO we configure it that way? What should we be reading = to figure out how to do that? I am not even sure we understand what it mean= s to run "embeded." Does that mean that that database is in the same VM? Th= at we don't go via JDBC at all? >> >> Also, we are trying to load a postgres dump into H2 and am failing becau= se H2 does not support the COPY statement. I have tried enabling postgres c= ompatibility mode by appending ';MODE=3DPostgreSQL' to my database url. Thi= s results in a error message stating 'File not found 'backup.sql'. I tried = putting my dump in a file by that name and got the same message. >> >> I also tried sticking 'SET MODE PostgreSQL ;' at the top of my SQL dump = file. This had no effect the script still abended with a syntax error on th= e COPY command. >> >> Where the best place to ask H2 questions? Is there an IRC room? A list s= erve? >> >> thanks! >> >> Eric >> >> +1 (917) 589-6579 >> >> >> >