db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: [jira] Updated: (DERBY-230) "Schema already exists" when creating a table
Date Fri, 27 May 2005 11:13:23 GMT
Dag H. Wanvik wrote:

>>>>>>"KM" == Kathey Marsden <kmarsdenderby@sbcglobal.net> wrote:
>KM> Daniel John Debrunner wrote:
>KM> >:
>KM> >util.startJBMS() call you see in other tests should be the preferred way
>KM> >to get a connection. This will then pick up any test properties that
>KM> >modify how connections should be obtained.
>KM> How should a test shut down a database?    I think I told Dag the wrong
>KM> thing this morning about his test.
>Well, it *did* work, cf my reply on that thread. I did consider using
>ij.startJBMS, but didn't see how I could restart Derby inside a test
>if I did. I now see ij.startJBMS does use
>Class.forName(driverClass).newInstance() so I guess I could achieve my
>aim of rebooting Derby several times with different sets of system
>properties that way, too. But I need a way to shut down, too. I didnt
>see any corresponding utility method to achieve that?

I think perhaps TestUtil.getDataSource(Properties attrs)  with the
shutDownDatabase property  might work for this purpose to shutdown with
the datasource instead of DriverManager and hopefully will work with
jsr169.  It picks up the datasource for the appropriate framework. 


View raw message