db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olav Sandstaa <Olav.Sands...@Sun.COM>
Subject Autoloading of JDBC drivers considered harmful?
Date Fri, 26 May 2006 23:00:01 GMT
Hi,

Based on some of the findings with the Nist tests failing when running 
with JDK 1.6 due to autoloading of the embedded driver I am not sure if 
it is a good idea to support autoloading of the embedded Derby driver.

Consider the following example:

1. Someone is having a small application that is using (for instance) 
the DB2 driver to connect to a Derby database. This application is 
running with JDK 1.5. It also happens that all the derby jar files in 
the path (afterall they do no harm since they are not used).

2. Someone is upgrading to JDK 1.6 and restarting this client 
application. It is still running as it should, but if the owner 
carefully examines it, she notices that the footprint of the application 
has increased and a profiler might show that there are at least one 
extra thread running (the Derby anti GC and possibly the background 
thread?) - basically the embedded driver and the derby engine might 
"automagically" have been loaded into the client depending on where 
derby.jar happened to be in the class path.

I have not tested that this happens yet, but will try it out on Monday.

Regards,
Olav




Mime
View raw message