db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oyvind.Bakk...@Sun.COM
Subject Re: derby jdbc load driver
Date Wed, 10 Aug 2005 08:36:25 GMT
Satheesh Bandaram wrote:
> I think Derby recommends using *.newInstance()* to load JDBC drivers... 
> In fact, it is required if you plan to shutdown and reboot databases on 
> the same thread/VM for Derby. Take a look at the javadoc for EmbeddedDriver.

Ok. But if Derby recommends it, then it should be explicitly mentioned 
in the manuals (both in the Reference and the Developer's Guide), which 
it isn't:


Instead, there are contradicting statements like the one below:

* Class.forName("org.apache.derby.jdbc.EmbeddedDriver")

Our recommended manner, because it ensures that the class is loaded in 
all JVMs by creating an instance at the same time.

What instance? Since there is no .newInstance() here, this can be 
understood as if the class has a static initializer which creates an 
instance of the class. And if so, why should the application do 

Øyvind Bakksjø
Sun Microsystems, Web Services, Database Technology Group
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43419 / +47 73842119, Fax: +47 73842101

View raw message