You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Peter Michaux (JIRA)" <ji...@apache.org> on 2008/01/21 21:32:36 UTC

[jira] Created: (DBCP-258) [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix

[PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix
---------------------------------------------------------------------------------------------

                 Key: DBCP-258
                 URL: https://issues.apache.org/jira/browse/DBCP-258
             Project: Commons Dbcp
          Issue Type: Improvement
    Affects Versions: 1.2.2
            Reporter: Peter Michaux
            Priority: Minor


This example has a very indirect way of registering the driver and getting it from the DriverManager.

  Class.forName("org.apache.commons.dbcp.PoolingDriver");
  PoolingDriver driver = (PoolingDriver) DriverManager.getDriver("jdbc:apache:commons:dbcp:");

It is much more direct and clearer to do the following

  PoolingDriver driver = new PoolingDriver();
  DriverManager.registerDriver(driver);

-------

There were some missing backslashes in the comments about running the example

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


[jira] Commented: (DBCP-258) [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix

Posted by "Peter Michaux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBCP-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561122#action_12561122 ] 

Peter Michaux commented on DBCP-258:
------------------------------------

Perhaps there are threading issues I'm not considering here and the current indirect technique in the example is a better practice?

> [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix
> ---------------------------------------------------------------------------------------------
>
>                 Key: DBCP-258
>                 URL: https://issues.apache.org/jira/browse/DBCP-258
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2.2
>            Reporter: Peter Michaux
>            Priority: Minor
>         Attachments: ManualPoolingDriverExamplePatch.diff
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> This example has a very indirect way of registering the driver and getting it from the DriverManager.
>   Class.forName("org.apache.commons.dbcp.PoolingDriver");
>   PoolingDriver driver = (PoolingDriver) DriverManager.getDriver("jdbc:apache:commons:dbcp:");
> It is much more direct and clearer to do the following
>   PoolingDriver driver = new PoolingDriver();
>   DriverManager.registerDriver(driver);
> -------
> There were some missing backslashes in the comments about running the example

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


[jira] Updated: (DBCP-258) [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBCP-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz updated DBCP-258:
-----------------------------

    Fix Version/s: 1.3

> [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix
> ---------------------------------------------------------------------------------------------
>
>                 Key: DBCP-258
>                 URL: https://issues.apache.org/jira/browse/DBCP-258
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2.2
>            Reporter: Peter Michaux
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: ManualPoolingDriverExamplePatch.diff
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> This example has a very indirect way of registering the driver and getting it from the DriverManager.
>   Class.forName("org.apache.commons.dbcp.PoolingDriver");
>   PoolingDriver driver = (PoolingDriver) DriverManager.getDriver("jdbc:apache:commons:dbcp:");
> It is much more direct and clearer to do the following
>   PoolingDriver driver = new PoolingDriver();
>   DriverManager.registerDriver(driver);
> -------
> There were some missing backslashes in the comments about running the example

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


[jira] Resolved: (DBCP-258) [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix

Posted by "Mark Thomas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBCP-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Thomas resolved DBCP-258.
------------------------------

    Resolution: Fixed

Thanks for the patch.
I fixed the missing back slashes but left the code as is as I can see advantages to both ways of getting the driver.

The fixed docs will be in 1.3 onwards.

> [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix
> ---------------------------------------------------------------------------------------------
>
>                 Key: DBCP-258
>                 URL: https://issues.apache.org/jira/browse/DBCP-258
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2.2
>            Reporter: Peter Michaux
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: ManualPoolingDriverExamplePatch.diff
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> This example has a very indirect way of registering the driver and getting it from the DriverManager.
>   Class.forName("org.apache.commons.dbcp.PoolingDriver");
>   PoolingDriver driver = (PoolingDriver) DriverManager.getDriver("jdbc:apache:commons:dbcp:");
> It is much more direct and clearer to do the following
>   PoolingDriver driver = new PoolingDriver();
>   DriverManager.registerDriver(driver);
> -------
> There were some missing backslashes in the comments about running the example

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


[jira] Closed: (DBCP-258) [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBCP-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz closed DBCP-258.
----------------------------


> [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix
> ---------------------------------------------------------------------------------------------
>
>                 Key: DBCP-258
>                 URL: https://issues.apache.org/jira/browse/DBCP-258
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2.2
>            Reporter: Peter Michaux
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: ManualPoolingDriverExamplePatch.diff
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> This example has a very indirect way of registering the driver and getting it from the DriverManager.
>   Class.forName("org.apache.commons.dbcp.PoolingDriver");
>   PoolingDriver driver = (PoolingDriver) DriverManager.getDriver("jdbc:apache:commons:dbcp:");
> It is much more direct and clearer to do the following
>   PoolingDriver driver = new PoolingDriver();
>   DriverManager.registerDriver(driver);
> -------
> There were some missing backslashes in the comments about running the example

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


[jira] Updated: (DBCP-258) [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix

Posted by "Peter Michaux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBCP-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Michaux updated DBCP-258:
-------------------------------

    Attachment: ManualPoolingDriverExamplePatch.diff

Two line change to code and a couple comment changes.

> [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix
> ---------------------------------------------------------------------------------------------
>
>                 Key: DBCP-258
>                 URL: https://issues.apache.org/jira/browse/DBCP-258
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2.2
>            Reporter: Peter Michaux
>            Priority: Minor
>         Attachments: ManualPoolingDriverExamplePatch.diff
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> This example has a very indirect way of registering the driver and getting it from the DriverManager.
>   Class.forName("org.apache.commons.dbcp.PoolingDriver");
>   PoolingDriver driver = (PoolingDriver) DriverManager.getDriver("jdbc:apache:commons:dbcp:");
> It is much more direct and clearer to do the following
>   PoolingDriver driver = new PoolingDriver();
>   DriverManager.registerDriver(driver);
> -------
> There were some missing backslashes in the comments about running the example

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


[jira] Commented: (DBCP-258) [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix

Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBCP-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688081#action_12688081 ] 

Phil Steitz commented on DBCP-258:
----------------------------------

I don't see the improvement.  Close as WONTFIX?

> [PATCH] ManualPoolingDriverExample - more direct construction of driver and minor comment fix
> ---------------------------------------------------------------------------------------------
>
>                 Key: DBCP-258
>                 URL: https://issues.apache.org/jira/browse/DBCP-258
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.2.2
>            Reporter: Peter Michaux
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: ManualPoolingDriverExamplePatch.diff
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> This example has a very indirect way of registering the driver and getting it from the DriverManager.
>   Class.forName("org.apache.commons.dbcp.PoolingDriver");
>   PoolingDriver driver = (PoolingDriver) DriverManager.getDriver("jdbc:apache:commons:dbcp:");
> It is much more direct and clearer to do the following
>   PoolingDriver driver = new PoolingDriver();
>   DriverManager.registerDriver(driver);
> -------
> There were some missing backslashes in the comments about running the example

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