Hi Bryan,

The latest patch replaces the code in the getLocalizedMessage(), so that is
calls the new function getArgs(). And now getArgs() returns the MessageId
field as the last element of the array.

I'm now working to integrate this work with your patch clientOutline.diff,
I suppose one of the difference that has been created with the latest patch
is that, the implementation of getArgs() needs sqlState and sqlerrmc,
whereas the clientOutline.diff has only sqlerrmc in the function call.
Though sqlstate is only needed when we don't have messageId, I feel passing
the sqlstate to getArgs() is cleaner way to do it than putting up an IF
condition at the other end to handle this case.

On Tue, Jul 28, 2015 at 3:04 AM, Abhinav Gupta (JIRA) <[email protected]>
wrote:

>
>      [
> https://issues.apache.org/jira/browse/DERBY-6801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
>
> Abhinav Gupta updated DERBY-6801:
> ---------------------------------
>     Attachment: MessageUtils_Latest_2.diff
>
> > 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)
>

Reply via email to