From: | Chen Huajun <chenhj(at)cn(dot)fujitsu(dot)com> |
---|---|
To: | dmp <danap(at)ttc-cmc(dot)net> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: [BUGS]log can not be output when use DataSource |
Date: | 2013-02-02 17:52:07 |
Message-ID: | 510D5247.5030508@cn.fujitsu.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi
I have made a new patch for BaseDataSource ,please check it.
Some modifications in getReference() is just for keeping
the same style to other String parameters .
Chen Huajun
(2013/01/30 1:23), dmp wrote:
>
> >> dmp wote:
>>> 3. The fourth column Chen in your spreadsheet is usefull in identifying two
>>> properties that are defined in the BaseDataSource but not implemented
>>> in getURL(). The properties user & password are included in getConnection()
>>> and therefore do not not need to be in getURL(). The two not implemented:
>>
>
> Chen Huajun wrote:
>> I advocate user & password also need to be in getURL().
>> Because getURL() is the key way to affect a connection created by the DataSource.
>> If a property not need be included in getURL(),it also seems not needed to appear in BaseDataSource.
>> And just like DriverManager,by which can set user & password via getConnection's arguments or url,
>> DataSource should same to DriverManager.
>>
>> Connection db = DriverManager.getConnection(url, username, password);
>>
>> or
>>
>> String url = "jdbc:postgresql://localhost/test?user=fred&password=secret&ssl=true";
>> Connection conn = DriverManager.getConnection(url);
>
> If this is a route you would like to take then that can be included with the
> patch for review. The Java API for the DataSource though only indicates the
> two methods:
>
> Connection getConnection()
> Connection getConnection(String username, String password)
>
> Therefore they must stay. The two additional methods you advocate only make
> more work, but has you say allows more flexibility.
>
> Chen, this project is really short of contributors so any major changes to the
> code must be accompanied by testing on your part. Maintenance seems to be me
> to be the main priority until that changes. That is why since you were familiar
> with the BaseDataSource logLevel bug I asked if you could review, to see if
> there were other similar bugs in that class for the properties.
>
> danap.
>
>
>
>
--
Best Regards
--------------------------------------------------
富士通南大軟件技術有限公司(FNST)
第二ソフトウェア事業部第三開発部
陳華軍(チン カグン)
Addr: 南京富士通南大軟件技術有限公司(FNST)
中国南京市雨花台区文竹路6号(210012)
Mail: chenhj(at)cn(dot)fujitsu(dot)com
Tel : +86+25-86630566-8406 内線: 7998-8406
Fax : +86+25-83317685
--------------------------------------------------
Attachment | Content-Type | Size |
---|---|---|
pgjdbc_BaseDataSource.patch | text/plain | 5.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | dmp | 2013-02-03 02:32:22 | Re: [BUGS]log can not be output when use DataSource |
Previous Message | Adrian Klaver | 2013-02-01 14:22:59 | Re: [JDBC] JDBC connection test with SSL on PG 9.2.1 server |