You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kim Haase (JIRA)" <ji...@apache.org> on 2008/07/30 22:55:31 UTC

[jira] Commented: (DERBY-503) Documentation should recommend using .newInstance() to instantiate JDBC driver

    [ https://issues.apache.org/jira/browse/DERBY-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618504#action_12618504 ] 

Kim Haase commented on DERBY-503:
---------------------------------

According to a comment from Knut Anders Hatlen on DERBY-3612, the newInstance() call is really needed only when you are reloading the driver, rather than when you are loading it for the first time. Should that be stated somewhere? Or is it just generally a good idea to use newInstance(), even when you are first loading the driver?

Also, in a number of topics in the doc it is noted that you don't need to call Class.forName() at all if you are using JDK 1.6. This should probably be stated in the topics where it isn't currently.

> Documentation should recommend using .newInstance() to instantiate JDBC driver
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-503
>                 URL: https://issues.apache.org/jira/browse/DERBY-503
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 10.1.1.0
>            Reporter: Oyvind Bakksjo
>            Assignee: Kim Haase
>            Priority: Minor
>
> Using Class.forName("<driver name>").newInstance() is the recommended way to load and instantiate the JDBC driver, but the documentation does not contain the .newInstance() part.
> Pointers:
> http://db.apache.org/derby/docs/10.1/devguide/cdevdvlp40653.html
> http://db.apache.org/derby/docs/10.1/ref/rrefjdbc32052.html
> The EmbeddedDriver javadoc mentions it:
> "The JDBC specification recommends the Class.ForName method without the .newInstance() method call, but adding the newInstance() guarantees that Derby will be booted on any Java Virtual Machine."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.