[
https://issues.apache.org/jira/browse/DERBY-4843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920538#action_12920538
]
Knut Anders Hatlen commented on DERBY-4843:
-------------------------------------------
I think the patch looks fine. One small nit is that I think the code may be
easier to read if we wrote the two if statements sequentially instead of
nesting them:
// Don't cache closed stmts
if (isClosed) {
return;
}
// Don't cache non-poolable stmts
if (!isPoolable) {
ps.close();
return;
}
> Consult isPoolable hint before caching prepared statement
> ---------------------------------------------------------
>
> Key: DERBY-4843
> URL: https://issues.apache.org/jira/browse/DERBY-4843
> Project: Derby
> Issue Type: Improvement
> Components: Network Client
> Affects Versions: 10.4.2.0, 10.5.3.0, 10.6.2.1, 10.7.0.0
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Priority: Trivial
> Attachments: derby-4843-1a-consult_isPoolable.diff
>
>
> The Derby JDBC client side statement cache should consult the value of the
> isPoolable hint before caching prepared statements.
> This will give users the ability to avoid that short-lived prepared
> statements push out more frequently used prepared statements in the case of a
> full statement cache.
> The API JavaDoc says that it is up to the cache whether the hint is used or
> not.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.