cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Armstrong <siber...@gmail.com>
Subject Re: Cayenne and H2 on the desktop
Date Wed, 21 Oct 2009 00:18:00 GMT
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 <mkienenb@gmail.com> wrote:
> 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 <ericllazarus@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
>>
>>
>>
>

Mime
View raw message