You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Kohei Nozaki <ky...@bridge9.sakura.ne.jp> on 2015/02/04 09:52:41 UTC

Stopping James doesn't delete db.lck of Derby

Hello,

I'm trying to setup latest James 3 in trunk, and found that var/store/derby/db.lck remained after shutdown of James. it looks like James doesn't execute shutdown process of Derby (acquire a connection with "jdbc:derby:;shutdown=true"). I think it may cause data corruption of the Derby database.

How can I configure James to execute properly shutdown of Derby? or is there a way to set a shutdown hook?

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Stopping James doesn't delete db.lck of Derby

Posted by Kohei Nozaki <ky...@bridge9.sakura.ne.jp>.
Hi, I found a solution so let me share it. I registered a bean which implements DisposableBean, executes shutdown procedure of Derby, to spring-server.xml. now I can see that there's no db.lck left after every shutdown of James. I pushed source code of the bean here:

https://github.com/lbtc-xxx/derby-shutdown-bean/blob/master/src/main/java/org/nailedtothex/derby/DerbyShutdownSpringBean.java

Also I posted detail of configuration in my blog:

http://www.nailedtothex.org/roller/kyle/entry/setting-up-apache-james-mail

Thanks.

> Hello,
> 
> I'm trying to setup latest James 3 in trunk, and found that var/store/derby/db.lck remained after shutdown of James. it looks like James doesn't execute shutdown process of Derby (acquire a connection with "jdbc:derby:;shutdown=true"). I think it may cause data corruption of the Derby database.
> 
> How can I configure James to execute properly shutdown of Derby? or is there a way to set a shutdown hook?
> 
> Thanks.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org