db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DERBY-6930) Embedded driver database remains locked after close
Date Sun, 02 Apr 2017 15:34:42 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rick Hillegas resolved DERBY-6930.
----------------------------------
    Resolution: Not A Bug

Resolving this issue as "Not a bug". The database was not gracefully closed by the first process
which opened an embedded connection. If an application needs to be able to connect from multiple
processes, then Derby should be run under a network server and clients should connect via
the client driver rather than the embedded driver.

> Embedded driver database remains locked after close
> ---------------------------------------------------
>
>                 Key: DERBY-6930
>                 URL: https://issues.apache.org/jira/browse/DERBY-6930
>             Project: Derby
>          Issue Type: Bug
>          Components: Miscellaneous
>    Affects Versions: 10.12.1.1
>         Environment: OS X and Ubuntu
>            Reporter: Alastair Rae
>            Priority: Minor
>
> 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:
> {code}
> 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();
>         }
>     }
> {code}
> After the first close I can see:
> {quote}
> $ fuser /tmp/database/*
> /tmp/database/dbex.lck: 13060
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message