[
https://issues.apache.org/jira/browse/DBCP-432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14301982#comment-14301982
]
Mark Thomas commented on DBCP-432:
----------------------------------
Your first patch looks good to me.
> BasicDataSource createDataSource can return partially initialized DataSource
> ----------------------------------------------------------------------------
>
> Key: DBCP-432
> URL: https://issues.apache.org/jira/browse/DBCP-432
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 2.0
> Reporter: Phil Steitz
> Attachments: DBCP-432-AtomicReference.patch, DBCP-432.patch
>
>
> The BasicDataSource instance variable, dataSource, is DCL-controlled in
> createDataSource; but within the sync block it is set directly and then
> subsequently initialized. Threads that request connections, or access
> createDataSource directly while initialization is in progress will get
> partially initialized dataSources. In particular, logWriters may be null and
> initial pool capacity may not be provisioned (if initialSize > 0).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)