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/05 04:13:04 UTC

[jira] [Commented] (DERBY-6801) Implement MessageUtils class so client and server can share message argument encoding/decoding

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

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

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

DERBY-6801: Implement MessageUtils class so client/server can share error code.

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

This change implements a new class in the "shared" portion of the Derby code
tree. The MessageUtils class contains code which was refactored from various
Engine and Network Server classes, including MessageService and DRDAConnThread.

The purpose of this class is to encapsulate certain details about how error
messages and exceptions are encoded and decoded when passed between the Network
Server and the Network Client, so that the Network Client can decode the
error information to access the arguments to the message when needed.

Nothing about the protocol between the client and server is changed, nor is
anything about the encoding of the data changed. The only change is to make
the logic which implements the encoding/decoding available to both the server
and the client so that they can both use it without duplicating the logic.

As of this change, nothing uses the MessageUtils class. That is, this change
adds the new class, but doesn't remove any of the existing implementations in
the Engine and Network Server code bases.

Follow-on changes will (incrementally) change the Engine, the Network Server,
and the Network Client to use the code in this new MessageUtils class.

> Implement MessageUtils class so client and server can share message argument encoding/decoding
> ----------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6801
>                 URL: https://issues.apache.org/jira/browse/DERBY-6801
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC, Network Client, Network Server
>            Reporter: Bryan Pendleton
>            Assignee: Abhinav Gupta
>            Priority: Minor
>         Attachments: MessageUtilsBryan.diff, MessageUtils_2.diff, MessageUtils_3.diff, MessageUtils_Latest.diff, MessageUtils_Latest_1.diff, MessageUtils_Latest_2.diff, MessageUtils_StandardEx_1.diff, MessageUtils_StandardExcep.diff, build.out, messageUtils.diff, messageUtils_1.diff, subPart2.diff, unsealDerbyNetJar.diff
>
>
> Currently, the Network Server contains code which encodes message arguments to be passed over DRDA to the client, and other code which
> decodes the encoded message arguments when the client passes
> them back in a call to SQLCAMESSAGE (see DERBY-1178 for additional
> discussion of this behavior).
> We would like to extract that logic and place it into a new MessageUtils
> class in the common shared library so that both the client and server
> can manipulate the message arguments without duplicating the code.



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