Re: Accessing embedded Derby in forked Maven2 build

2006-03-13 Thread Randy Watler
Andrew/Jean, I have resolved this by forking the build process to place the sql operations against the DB in a separate JVM process. This way, the build will sequentially startup individual JVMs for all derby access and thereby avoid the locks. To make life easier for Ant and other similarly

Re: Using DdlUtils to Migrate Databases to Derby (MySQL-to-Derby)

2006-03-13 Thread Jean T. Anderson
Jean T. Anderson wrote: > Thanks for this feedback, Thomas. I'll update Step 5 to mention reasons > for tweaking the types in the generated schema xml file. > > Also, over on ddlutils-user Tom Dudziak mentioned that he checked in a > change that addresses needing to set the database name in the s

Re: Accessing embedded Derby in forked Maven2 build

2006-03-13 Thread Randy Watler
Jean T. Anderson wrote: This developerWorks article provides StopDatabaseTask and StopDerbyTask Ant tasks: http://www.ibm.com/developerworks/db2/library/techarticle/dm-0412snell/index.html If this helps resolve your problem, please let us know. -jean I've been trying hard to avoid the cus

Re: Accessing embedded Derby in forked Maven2 build

2006-03-13 Thread Jean T. Anderson
Randy Watler wrote: > Andrew: > > Andrew McIntyre wrote: > >> >> It sounds like you're setting up a test database using Ant's >> commands and this leaves the Derby engine running in the same VM as >> Ant. So, my original solution wouldn't work, as ij wouldn't be able to >> connect. It sounds lik

Re: Accessing embedded Derby in forked Maven2 build

2006-03-13 Thread Randy Watler
Andrew, Below are the errors I am getting w/o a fork... not sure why this is and how ij knows there is another connection from this same JVM, (albeit probably a different classloader)? ij version 10.1 ij> connect 'jdbc:derby:/tmp/testdb'; ERROR XJ040: Failed to start database '/tmp/testdb', s

Re: Accessing embedded Derby in forked Maven2 build

2006-03-13 Thread Randy Watler
Andrew: Andrew McIntyre wrote: It sounds like you're setting up a test database using Ant's commands and this leaves the Derby engine running in the same VM as Ant. So, my original solution wouldn't work, as ij wouldn't be able to connect. It sounds like you may need to move the creation of th

Re: Accessing embedded Derby in forked Maven2 build

2006-03-13 Thread Andrew McIntyre
On 3/13/06, Randy Watler <[EMAIL PROTECTED]> wrote: > Andrew, > > Thanks for the speedy reply. Let me give this a try. > > To be honest, I am confused about the use of the fork="true" attribute > in the task. Can shutdown=true be invoked from another JVM > instance like this and have it release th

Re: Accessing embedded Derby in forked Maven2 build

2006-03-13 Thread Andrew McIntyre
On 3/13/06, Randy Watler <[EMAIL PROTECTED]> wrote: > > What I'd really like to have is an SQL statement I can execute to > perform the shutdown. Barring that, finding a way to avoid throwing the > connect SQLException might also work. A Derby Ant task to perform the > shutdown would be very handy

Re: Accessing embedded Derby in forked Maven2 build

2006-03-13 Thread Randy Watler
Andrew, Thanks for the speedy reply. Let me give this a try. To be honest, I am confused about the use of the fork="true" attribute in the task. Can shutdown=true be invoked from another JVM instance like this and have it release the lock that the parent JVM is holding? Randy Andrew McInt

Accessing embedded Derby in forked Maven2 build

2006-03-13 Thread Randy Watler
All, I am running into difficulties finding a way to shutdown a Derby database, (10.1.1.0), from within an Ant build invoked from Maven2. I need to do this to release a database lock for the running JVM so that subsequently forked tests in their own JVMs can access the database. Here is what

Re: Using DdlUtils to Migrate Databases to Derby

2006-03-13 Thread Thomas Dudziak
On 3/13/06, yeradis <[EMAIL PROTECTED]> wrote: > hi jean > i'm back ;-) > i was reading this topic > and i have a question > where is this tool called DdlUtils There is a link right at the start of Jean's example. Tom

Re: Using DdlUtils to Migrate Databases to Derby

2006-03-13 Thread yeradis
hi jean i'm back ;-) i was reading this topic and i have a question where is this tool called DdlUtils On 3/10/06, Jean T. Anderson <[EMAIL PROTECTED]> wrote: David W. Van Couvering wrote:> Nice!  Have you tried migrating from another database?  If I read it> right, your example shows migrat