db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Bradley" <ph...@tower.ie>
Subject Force condition: ERROR 08000: Connection closed by unknown interrupt
Date Thu, 20 Oct 2011 11:59:46 GMT


I have an application that uses Derby in embedded mode.
Occasionally, I run into the condition: 

java.sql.SQLNonTransientConnectionException: Connection closed by
unknown interrupt
Caused by: ERROR 08000: Connection closed by unknown interrupt.

My understanding is that this state occurs if a thread accessing the
database gets interrupted. As a workaround, the application has some
logic which detects when this occurs and handles it by:

1. Closing all connections
2. Shutting down the database (new DerbyShutdownRunner().shutdown())
3. Recreating the connections

At the moment, this doesn't address the problem. Specifically, even
after taking these steps, the exception gets thrown after every database
operation. It's quite possible that there's a flaw in the implementation
of the above steps but the meta issue is that I don't have a way to test
this logic as I don't have a way to force the error condition.

So, my question is, is there a way that I can reliably force the
application into the above state in order to test its ability to recover
from it? 


View raw message