Re: [BUGS]log can not be output when use DataSource

Поиск
Список
Период
Сортировка
От dmp
Тема Re: [BUGS]log can not be output when use DataSource
Дата
Msg-id 51080592.5080904@ttc-cmc.net
обсуждение исходный текст
Ответ на Re: [BUGS]log can not be output when use DataSource  (Chen Huajun <chenhj@cn.fujitsu.com>)
Ответы Re: [BUGS]log can not be output when use DataSource
Список pgsql-jdbc
 >> 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.




В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Bug report: NullPointerException from Driver.connect when passed a Properties with non-string values
Следующее
От: Hari Babu
Дата:
Сообщение: Re: JDBC connection test with SSL on PG 9.2.1 server