You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2008/01/23 15:35:34 UTC
[jira] Commented: (DERBY-3325) Add 'maxStatements' property to
ClientConnectionPoolDataSource
[ https://issues.apache.org/jira/browse/DERBY-3325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561691#action_12561691 ]
Knut Anders Hatlen commented on DERBY-3325:
-------------------------------------------
I think your approach is fine. One variant that you may consider, is to move the getter and the field to ClientConnectionPoolDataSource and make the field private, and write a new getter in ClientBaseDataSource that just returns 0. Then you state more explicitly that the field is only used by CCPDS, and that DataSource classes that don't override getMaxStatement() never cache statements. Not that there's much difference between the variants, so feel free to choose whichever you want...
I noticed that testGetConnectionWithStatemenPooling() (whose name misses a 't' in 'Statement', btw, as does its sibling s/With/Without/) was disabled, but after a brief inspection I couldn't see that anything would fail even before statement pooling is implemented. Perhaps it could be enabled right away?
Could you log an issue for the bug you found in the test framework? It seems unnecessary that every test that uses DataSources needs to have a workaround for the 08004 error when running standalone. It would at least be good to track it.
Test code that looks like this:
+ rs = ps1.executeQuery();
+ assertTrue(rs.next());
+ assertEquals(31, rs.getInt(1));
would be simpler (and have rs closed automatically) if written like this:
JDBC.assertSingleValueResultSet(ps1.executeQuery(), "31");
> 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.