Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6930

Embedded driver database remains locked after close

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Bug
    • 10.12.1.1
    • None
    • Miscellaneous
    • None
    • OS X and Ubuntu
    • Normal

    Description

      1 Open and close a local embedded database in one process.
      2 Open the database from another process - it fails with ERROR XJ040
      Simple test program:

      public static void main(String[] args) {
              Properties p = new Properties();
              p.setProperty("user", "dummy");
              p.setProperty("password", "dummy");
              String url = "jdbc:derby:/tmp/database;create=true";
              try {
                  Connection c = DriverManager.getConnection(url, p);
                  c.close();
                  System.out.println("closed");
                  Thread.sleep(10000L);
                  System.out.println("ok");
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      

      After the first close I can see:

      $ fuser /tmp/database/*
      /tmp/database/dbex.lck: 13060

      Attachments

        Activity

          People

            Unassigned Unassigned
            alastair.rae Alastair Rae
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: