[
https://issues.apache.org/jira/browse/DERBY-3324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563601#action_12563601
]
Daniel John Debrunner commented on DERBY-3324:
----------------------------------------------
The order of the arguments of holdability, result set type & concurrency in the
statement key objects are inconsistent.
E.g. StatementKeyFactory.newPrepared has:
int holdability, int rst, int rsc
but it calls new StatementKey() with the order of:
rst, rsc, holdability
and I think will be called from Connection.prepareStatement which has the order
of:
int resultSetType, int resultSetConcurrency, int resultSetHoldability
Since these are all int values the compiler will not help in ensuring that the
arguments are passed correctly. I think this switching of arguments serves no
purpose and has a high probability of generating bugs. Can the ordering be made
consistent?
> JDBC statement cache implementation
> -----------------------------------
>
> Key: DERBY-3324
> URL: https://issues.apache.org/jira/browse/DERBY-3324
> Project: Derby
> Issue Type: Sub-task
> Components: Network Client
> Affects Versions: 10.4.0.0
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Priority: Minor
> Fix For: 10.4.0.0
>
> Attachments: derby-3324-1a-jdbc_statementcache.diff,
> derby-3324-1a-jdbc_statementcache.stat,
> derby-3324-1b-jdbc_statementcache.diff,
> derby-3324-1b-jdbc_statementcache.stat,
> derby-3324-1c-jdbc_statementcache.diff,
> derby-3324-1c-jdbc_statementcache.stat,
> derby-3324-1d-jdbc_statementcache.diff, derby-3324-1e-jdbc_statementcache.diff
>
>
> Implement a cache for storing JDBC prepared statement objects.
> The cache will be responsible for holding free prepared statement objects
> that can be reused, and also to throw away objects if the cache grows too big.
> All objects in the cache must belong to the same physical connection, but
> they can be reused across logical connections obtained from a single physical
> connection in a connection pool.
> This component is probably a candidate for code sharing between the client
> and the embedded driver. Sharing will not be part of this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.