db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1471) Implement layer B streaming for new methods defined in JDBC4.0
Date Wed, 06 Dec 2006 15:34:23 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1471?page=comments#action_12456093 ] 
            
Knut Anders Hatlen commented on DERBY-1471:
-------------------------------------------

I have looked at patch 3. I don't know enough about layer B streaming
to say whether all details of the implementation are correct, but I
have a couple of comments. All of the comments are about minor issues,
so it would be perfectly OK to commit the patch as it is and address
the comments in a followup patch.

* BrokeredPreparedStatement now implements length-less setBinaryStream
  and setCharacterStream. We could therefore remove them from
  BrokeredPreparedStatement40.

* In DRDAConnThread.readAndSetExtParam(), some of the code has been
  changed from

    if (stream == null) {
       ...
    } else {
       ...
    }

  to

    if (stream == null) {
        ...
    } else if (stream instanceof StandardEXTDTAReaderInputStream) {
        ... // basically do the same as in the old else clause
    } else if (stream instanceof LayerBStreamedEXTDTAReaderInputStream) {
        ...
    }

  I would feel more comfortable if the code in the first else-if
  clause were put into an else clause. If the stream is of another
  type (shouldn't happen, but someone might extend the code later), it
  will be silently ignored.

* Inner class PublicBufferOutputStream in DRDAConnThread could be
  private. Or even better, since ReEncodedInputStream also implements
  such a class, it could be implemented as a stand-alone class that
  could be shared between DRDAConnThread and ReEncodedInputStream.

* In NetStatementRequest, 0x8002 is used as a magic number many
  places. Perhaps it could be explained in a comment, or a constant
  could be used instead?

* Blob/Clob: The variable willBeLayerBStreamed_ and the method
  willBeLayerBStreamed() could be moved to the base class (Lob) to
  avoid duplicated code.

> Implement layer B streaming for new methods defined in JDBC4.0
> --------------------------------------------------------------
>
>                 Key: DERBY-1471
>                 URL: http://issues.apache.org/jira/browse/DERBY-1471
>             Project: Derby
>          Issue Type: New Feature
>          Components: Network Client
>            Reporter: Tomohito Nakayama
>         Assigned To: Tomohito Nakayama
>         Attachments: DERBY-1471.diff, DERBY-1471.patch, DERBY-1471.stat, DERBY-1471_2.patch,
DERBY-1471_2.stat, DERBY-1471_3.patch, DERBY-1471_3.stat
>
>
> JDBC 4.0 introduced new methods which take parameters for object to be sent to sever
without length information.
> For those methods, Layer B streaming is best way to implement sending object to server.
> This issue is representation of DERBY-1417 in Network Client.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message