Prior to exiting, my Java program issues a shutdown, and then tries to delete
the DB directory (recursively), but is not able to completely delete the
directory.  Here's the code:

        try {
                DriverManager.getConnection("jdbc:derby:;shutdown=true");
        } catch (SQLException eSQLException) {
                if (
                                eSQLException.getErrorCode() == 50000
                                &&
                                "XJ015".equals(eSQLException.getSQLState())
                   ) {
                                                                                
// successful shutdown
                } else
                        printSQLException(eSQLException);
        }
        removeDir(new File(dbnmString));        // remove DB directory

(removeDir is my own function)

If removeDir() is called before connecting to the DB, it works fine.  But
the above call to removeDir() only deletes some of the files and directories
within dbnmString -- as if Derby is still accessing them (or has not closed
them).

I also tried dropping the DB just before the shutdown code, with the same
results.

Any ideas would be appreciated.

 
-- 
View this message in context: 
http://old.nabble.com/can%27t-delete-my-DB-directory-tp28782490p28782490.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Reply via email to