Thanks, Folks!

What 'adapter' do I use for H2 in cayenne.xml? What 'adapter' do I use for H2 
in cayenne.xml? I imagine it will be something like cayenne.dba.H2.H2Adapter?

About the meaning of 'embedded': I think that the 2nd option has a
server process running tcp on some port number in the 9000's. Does this
count as an 'embedded' database? I assume not.

Also, what happens in the
first case if the user opens two instances of the program on his
desktop. Does not each instance access the same files ? What kind of
locking is implemented in that case?

Thanks! 

Eric



--- On Tue, 10/20/09, Mike Kienenberger <mkien...@gmail.com> wrote:

From: Mike Kienenberger <mkien...@gmail.com>
Subject: Re: Cayenne and H2 on the desktop
To: user@cayenne.apache.org
Date: Tuesday, October 20, 2009, 8:10 PM

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).  Most 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.   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 <ericllaza...@yahoo.com> wrote:
> 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, should 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 means to 
> run "embeded." Does that mean that that database is in the same VM? That we 
> don't go via JDBC at all?
>
> Also, we are trying to load a postgres dump into H2 and am failing because H2 
> does not support the COPY statement. I have tried enabling postgres 
> compatibility mode by appending ';MODE=PostgreSQL' to my database url. This 
> 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 the COPY 
> command.
>
> Where the best place to ask H2 questions? Is there an IRC room? A list serve?
>
> thanks!
>
> Eric
>
> +1 (917) 589-6579
>
>
>



      

Reply via email to