Hello Knut.
Thank you for your counsel :)

Knut Anders Hatlen wrote:

TomohitoNakayama <[EMAIL PROTECTED]> writes:

Hello.

Continuing DERBY-1301(http://issues.apache.org/jira/browse/DERBY-1301),
I came to have question whether layer B streaming should be done when
lob was sent from client to server.

Reading javadoc for java.sql package, I found that methods passing
stream object to driver always takes parameter for length information.
Then, driver can simply pass that length information to server.

I think there are no need for driver to execute layer B streaming,
because caller of driver always pass length of streamed object to driver.

Hi Tomohito,

I don't know how it relates to layer B streaming, but JDBC 4.0 will
add methods with a stream parameter and no length parameter. The
javadocs at http://download.java.net/jdk6/docs/api/ have not been
updated with these methods yet, but I believe they will be in a week
or two. You can find more details in DERBY-1417.
I see.
I recognize there exists need for layer B streaming, which does not require to send length information, concerning JDBC4.0.


However, here comes another question.

DERBY-550(http://issues.apache.org/jira/browse/DERBY-550), which is
linked from DERBY-1301 told that
current implementation of org.apache.derby.jdbc.ClientDriver expands
object to be streamed into memory and
this behavior tends to cause OutOfMemoryError.

Are there any reason why current driver expands object into memory,
though length of the object is served as parameter of method ?

Probably because it was the easiest way to implement it. I don't see
any good technical reasons for doing it like that.
I see.
Then, it is issue to be improved, I suppose.

Well....
I think it is needed to survey some more around current implementation
of driver and
clear the mystery in org.apache.derby.jdbc.ClientDriver, around
expanding object into memory before sending ....

It would be great to improve the stream handling on the client. I have
just briefly looked at the code, but it seems clear that this is a
part of the code that has room for improvement. Thanks for looking
into it!

I think here we found two issue.
1) Implement layer B streaming for new methods defined in JDBC4.0.
2) Remove expanding object to memory before sending it.

I will file them on JIRA and continue.

Best regards.

--
/*

       Tomohito Nakayama
       [EMAIL PROTECTED]
       [EMAIL PROTECTED]
       [EMAIL PROTECTED]

       Naka
       http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/

Reply via email to