Working with database threads in an embedded environment Do not use interrupt calls to notify threads that are accessing a database, because will catch the interrupt call and close the connection to the database. Use wait and notify calls instead. Threadssleep and interrupt callsnotifying interrupt callscaught by Derby

This will not happen in a client/server environment, but if you want your application to work in either environment it is good practice to follow this rule.

There are also special considerations when working with more than one database thread in an application.