[
https://issues.apache.org/jira/browse/DERBY-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12562113#action_12562113
]
Daniel John Debrunner commented on DERBY-3325:
----------------------------------------------
There are existing non-SQL exceptions that use MessageUtil directly to obtain
the localized text. A code search should find an example.
Kristian wrote:
--------
What I meant about avoiding casts in the factory methods, is that all methods
taking a data source take ClientBaseDataSource. If I didn't add
getMaxStatements into CBDS, I would have to start checking if I could cast to
CPDS or XADS to get the value of the maxStatements property.
Instead of the current approach, one could change the method signatures and
possibly introduce another data source class/interface. After incorporating
Knut Anders' suggestion, I'm quite happy about the current situation though.
---------
My point was I'm not sure why the factory methods even need to know about
maxStatements. Encapsulating the logic within the the connection pooling data
source and the connection pooling object would seem to make more sense. E.g.
the pooling data source passes a parameter to the constructor of its pooling
connection implementation that is maxStatements. Then all the pooling logic is
self-contained in the pooled connection. If you could point to a patch and
where the factory methods need to know about maxStatements, maybe I could
understand what the issue is better.
> Add 'maxStatements' property to ClientConnectionPoolDataSource
> --------------------------------------------------------------
>
> Key: DERBY-3325
> URL: https://issues.apache.org/jira/browse/DERBY-3325
> Project: Derby
> Issue Type: Sub-task
> Components: JDBC, Network Client
> Affects Versions: 10.4.0.0
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Priority: Minor
> Fix For: 10.4.0.0
>
> Attachments: derby-3325-1a-maxStatements.diff,
> derby-3325-1a-maxStatements.stat
>
>
> The classes in Derby implementing javax.sql.ConnectionPoolDataSource must
> provide setter and getter methods for the property 'maxStatements'.
> This property is used to control the whether the data source should produce
> pooled connections with statement cache capabilities or not, and how big the
> statement cache is allowed to be.
> This issue only deals with the client JDBC driver.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.