You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2016/01/05 18:31:39 UTC

[jira] [Comment Edited] (PHOENIX-2368) Call Driver.accept() in Driver.getConnection and return null if false

    [ https://issues.apache.org/jira/browse/PHOENIX-2368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082414#comment-15082414 ] 

James Taylor edited comment on PHOENIX-2368 at 1/5/16 5:31 PM:
---------------------------------------------------------------

I think for this JIRA, you should call acceptURL(url) and return null outside of any locking. Only if acceptURL passes, would you proceed with the existing logic/locking. [~ram_krish]


was (Author: jamestaylor):
I think for this JIRA, you should call acceptURL(url) and return null outside of any locking. Only if acceptURL passes, would you proceed with the existing logic/locking.

> Call Driver.accept() in Driver.getConnection and return null if false
> ---------------------------------------------------------------------
>
>                 Key: PHOENIX-2368
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2368
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: ramkrishna.s.vasudevan
>              Labels: SFDC, newbie
>             Fix For: 4.7.0
>
>
> The driver should return "null" if it realizes it is the wrong kind of driver to connect to the given URL.
> Your driver is throwing an exception instead of returning null.
> Here's the start of a test case:
> {code}
> public static void main(String[] args) throws Exception {
>     Class.forName(PhoenixDriver.class.getName());
>     PhoenixDriver d = (PhoenixDriver) DriverManager.getDriver("jdbc:phoenix");
>     d.close();
>     DriverManager.getConnection("any text whatever you want to put here");
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)