db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: derby jdbc load driver
Date Thu, 11 Aug 2005 23:51:14 GMT
Agreed... Guess we should document this correctly. Shall I file a
document bug or would you want to?

Satheesh

Oyvind.Bakksjo@Sun.COM wrote:

> 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:
>
> http://db.apache.org/derby/docs/10.1/devguide/cdevdvlp40653.html
> http://db.apache.org/derby/docs/10.1/ref/rrefjdbc32052.html
>
> 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
> .newInstance()?
>


Mime
View raw message