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 "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/08/06 02:37:05 UTC

[jira] [Commented] (DERBY-6823) Refactor uses of DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH

    [ https://issues.apache.org/jira/browse/DERBY-6823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659263#comment-14659263 ] 

ASF subversion and git services commented on DERBY-6823:
--------------------------------------------------------

Commit 1694383 from [~bryanpendleton] in branch 'code/trunk'
[ https://svn.apache.org/r1694383 ]

DERBY-6802: Change NetworkServer code to use new MessageUtils class
DERBY-6823: Refactor uses of DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH

This patch was contributed by Abhinav Gupta (abhinavgupta2004 at gmail dot com)

This change modifies several classes in the Network Server and Engine
code bases to use the new features of the MessageUtils class in the
shared code.

The intent of this change is that no behavior is altered. The same
algorithms, data structures, network protocols, etc. are in use;
the only difference is that the implementation of the error message
and exception encoding logic is now drawn from MessageUtils methods
rather than being spread over several classes in the Network Server
and Engine code.

> Refactor uses of DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH
> ---------------------------------------------------
>
>                 Key: DERBY-6823
>                 URL: https://issues.apache.org/jira/browse/DERBY-6823
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Network Server, SQL
>            Reporter: Bryan Pendleton
>            Priority: Minor
>
> There is some duplication of code, probably historic, which
> leads to multiple definitions of the named constant
> DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH:
> $ find . -name '*.java' -exec grep DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH {} \; -print
>         return Limits.DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH;
> ./java/drda/org/apache/derby/impl/drda/AppRequester.java
>         public static final int DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH = 2400;
> ./java/engine/org/apache/derby/iapi/reference/Limits.java
>                                                 Types.VARCHAR, Limits.DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH),
> ./java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
> I suspect this code pre-dates the work to create the "shared" library
> where code shared among all Derby jar packages can reside.
> It seems like we should be able to refactor this code so that
> there is only one instance of DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH,
> and it seems like the new MessageUtils class proposed by
> DERBY-6801 would be a good place for that constant to live.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)