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

Embedded driver database remains locked after close

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Bug
    • Affects Version/s: 10.12.1.1
    • Fix Version/s: None
    • Component/s: Miscellaneous
    • Labels:
      None
    • Environment:
      OS X and Ubuntu
    • Urgency:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: