I am running Derby server inside my web application which is running in Tomcat 5. I need to run Derby as a server in order to allow batch processes and the web application to access the database. What I have discovered is that shutting down Derby from within my web application does not completely shutdown Derby, the AntiGC thread continues to run.

 

I checked the mailing list archives and found no references to AntiGC. I then checked the derby bugs list and found bug 23 which indicated a memory leak and a suggested fix that was applied. However the bug has been re-opened due to continuing problems. The problems that were identified had to do with the embedded driver. I wanted to mention that I am having problems with the server as well. I was previously using 10.1.1.0 and switched to 10.1.1.1 due to the patch but found that the problem did in fact persist.

 

When I do shutdown Derby the following 2 threads remain:

Thread [derby.antiGC] (Running)

Thread [derby.rawStoreDaemon] (Running)

 

When Derby is running I see the following threads:

Thread [derby.NetworkServerStarter] (Running)

Thread [Thread-40] (Running)

Thread [DRDAConnThread_41] (Running)

Thread [derby.antiGC] (Running)

Thread [derby.rawStoreDaemon] (Running)

 

 

So far the only consequences of this problem for me are the inability to remotely shutdown the application and redeploy using the Tomcat Manager.