db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Watler <wat...@wispertel.net>
Subject Re: Accessing embedded Derby in forked Maven2 build
Date Mon, 13 Mar 2006 21:01:03 GMT

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 <java> task. Can shutdown=true be invoked from another JVM 
instance like this and have it release the lock that the parent JVM is 


Andrew McIntyre wrote:
> On 3/13/06, Randy Watler <watler@wispertel.net> 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 as well if it is available in the Derby
>> distribution. Are any of these or other options available that I might try?
> There isn't currently a Derby Ant task, but feel free to contribute
> one if you have the time. I recently wanted to do the same thing for
> an Ant build.xml that builds a sample database for Derby (see
> DERBY-422 in JIRA), and I used ij:
>     <java classname="org.apache.derby.tools.ij"
>           append="true"
>           failonerror="true"
>           dir="." fork="true">
>       <classpath>
>         <pathelement path="${lib.dir}/derby.jar"/>
>         <pathelement path="${lib.dir}/derbytools.jar"/>
>       </classpath>
>       <arg value="shutdown.sql"/>
>     </java>
> Where the contents of shutdown.sql is:
> connect 'jdbc:derby:toursdb';
> connect 'jdbc:derby:toursdb;shutdown=true';
> Would that do the trick?
> andrew

View raw message