db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Ondruška <peter.ondru...@kaibo.eu>
Subject Re: EmbeddedDriver and db.lck file
Date Wed, 17 Jun 2015 17:19:55 GMT
This is what I di in context listener:

@Override  public void contextDestroyed(final ServletContextEvent sce)
{        final ServletContext context = sce.getServletContext();
final String PERSIST_ROOT =
context.getInitParameter("PERSISTENT_ROOT");    final String DB_URL =
DB_PREFIX.concat(PERSIST_ROOT).concat("db");        try {
DriverManager.getConnection(DB_URL + SHUTDOWN, USERNAME, PASSWORD);
} catch (final SQLException e) {      // ignore    }      }



On Wednesday, 17 June 2015, Thomas Meyer <thomas@m3y3r.de> wrote:

> Hi,
>
> I have a Servlet running under Jetty 9.2.11 which uses EclipseLink 2.6as
> JPA tool. In the JPA tool I did configure the usage of the Derby Embedded
> 10.11.1 driver. For a fresh start of the jetty server everything works as
> expected.
> But when I now redeploy the context config XML file after I did update the
> referenced war file, derby begins to tell me that another instance did
> already boot the database.
> Somehow the db.lck file is not released when I close the
> EntityManagerFactory.
>
> Any idea what's going on here?
>
> How can I force the release of the db.lck file in a
> ServletListener.contextDestroyed() method?
>
> With kind regards
> Thomas



-- 
Peter Ondruška

Mime
View raw message