Re: Database shutdown not releasing file locks

2007-11-06 Thread EdS

Finally resolved my issue which is founded in some poor code...I was not
explicitly closing off ResultSets and Connections when finished with them. 
The strange thing is I do not get the errors when making requests to a
remote machine (specifically a Linux server).

From what I can gather, my code is in a race with how quickly GC occurs.  

Anyone know if Derby uses the References API for tracking outstanding
resource usage?

cheers,

Ed



EdS wrote:
 
 Running embedded mode within a Tomcat webapp.  I have some Java code that
 programmatically does the shutdown and directory deletion.  
 
 I get the expected SQLException on the shutdown.  Attempting to delete the
 directories fails both within the webapp and from external shell command.
 
 In a debugger I've paused a derby.rawStoreDaemon thread to walk the data
 structures.  I have come across references to the database in question. 
 So somewhere along the lines the shutdown isn't really cleaning everything
 up.
 
 I was under the impression that a shutdown pickles off any outstanding
 connections.  Is it possible that a reference to an existing connection
 (obtained prior to the shutdown) is harboring the reference to this data
 file?
 
 BTW--Thanks for the quick reply!
 
 cheers,
 
 Ed
 
 
 
 Manjula Kutty wrote:
 
 I tried the same scenario you mentioned and I'm able to delete the
 database
 without any problem? Are you deleting manually or through any pgm?
 
 -Manjula
 
 
 On 10/3/07, EdS [EMAIL PROTECTED] wrote:


 I run into an issue where i dynamically create databases to cache
 data.  At
 some point when I no longer need the cache, I perform a shutdown and
 delete
 the directory where the database resides.

 Unfortunately there's still open file references to one of the c*.dat
 files
 that prevents me from getting a clean filesystem delete.

 Anyone else seen this behavior, or is it a known bug?  My searches so
 far
 have proved fruitless.

 tia,

 Ed


 --
 View this message in context:
 http://www.nabble.com/Database-shutdown-not-releasing-file-locks-tf4564520.html#a13028425
 Sent from the Apache Derby Users mailing list archive at Nabble.com.


 
 
 -- 
 Thanks,
 Manjula.
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Database-shutdown-not-releasing-file-locks-tf4564520.html#a13619297
Sent from the Apache Derby Users mailing list archive at Nabble.com.



Database shutdown not releasing file locks

2007-10-03 Thread EdS

I run into an issue where i dynamically create databases to cache data.  At
some point when I no longer need the cache, I perform a shutdown and delete
the directory where the database resides.

Unfortunately there's still open file references to one of the c*.dat files
that prevents me from getting a clean filesystem delete.

Anyone else seen this behavior, or is it a known bug?  My searches so far
have proved fruitless.

tia,

Ed


-- 
View this message in context: 
http://www.nabble.com/Database-shutdown-not-releasing-file-locks-tf4564520.html#a13028425
Sent from the Apache Derby Users mailing list archive at Nabble.com.



Re: Database shutdown not releasing file locks

2007-10-03 Thread Manjula Kutty
I tried the same scenario you mentioned and I'm able to delete the database
without any problem? Are you deleting manually or through any pgm?

-Manjula


On 10/3/07, EdS [EMAIL PROTECTED] wrote:


 I run into an issue where i dynamically create databases to cache
 data.  At
 some point when I no longer need the cache, I perform a shutdown and
 delete
 the directory where the database resides.

 Unfortunately there's still open file references to one of the c*.dat
 files
 that prevents me from getting a clean filesystem delete.

 Anyone else seen this behavior, or is it a known bug?  My searches so far
 have proved fruitless.

 tia,

 Ed


 --
 View this message in context:
 http://www.nabble.com/Database-shutdown-not-releasing-file-locks-tf4564520.html#a13028425
 Sent from the Apache Derby Users mailing list archive at Nabble.com.




-- 
Thanks,
Manjula.


Re: Database shutdown not releasing file locks

2007-10-03 Thread EdS

Running embedded mode within a Tomcat webapp.  I have some Java code that
programmatically does the shutdown and directory deletion.  

I get the expected SQLException on the shutdown.  Attempting to delete the
directories fails both within the webapp and from external shell command.

In a debugger I've paused a derby.rawStoreDaemon thread to walk the data
structures.  I have come across references to the database in question.  So
somewhere along the lines the shutdown isn't really cleaning everything up.

I was under the impression that a shutdown pickles off any outstanding
connections.  Is it possible that a reference to an existing connection
(obtained prior to the shutdown) is harboring the reference to this data
file?

BTW--Thanks for the quick reply!

cheers,

Ed



Manjula Kutty wrote:
 
 I tried the same scenario you mentioned and I'm able to delete the
 database
 without any problem? Are you deleting manually or through any pgm?
 
 -Manjula
 
 
 On 10/3/07, EdS [EMAIL PROTECTED] wrote:


 I run into an issue where i dynamically create databases to cache
 data.  At
 some point when I no longer need the cache, I perform a shutdown and
 delete
 the directory where the database resides.

 Unfortunately there's still open file references to one of the c*.dat
 files
 that prevents me from getting a clean filesystem delete.

 Anyone else seen this behavior, or is it a known bug?  My searches so far
 have proved fruitless.

 tia,

 Ed


 --
 View this message in context:
 http://www.nabble.com/Database-shutdown-not-releasing-file-locks-tf4564520.html#a13028425
 Sent from the Apache Derby Users mailing list archive at Nabble.com.


 
 
 -- 
 Thanks,
 Manjula.
 
 

-- 
View this message in context: 
http://www.nabble.com/Database-shutdown-not-releasing-file-locks-tf4564520.html#a13029853
Sent from the Apache Derby Users mailing list archive at Nabble.com.