db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh" <drem...@gmail.com>
Subject Re: [DRDA] Question about DRDAStatement.initialize() method
Date Fri, 24 Feb 2006 17:32:06 GMT
On 2/24/06, Kathey Marsden <kmarsdenderby@sbcglobal.net> wrote:
>
> >Deepa Remesh <dremesh@gmail.com> writes:
> >
> >
> >
> >>        DRDAStatement stmt = getDRDAStatement(pkgnamcsn);
> >>        if (stmt != null) {
> >>            stmt.reset();
> >>
> >>
> [snip]
>
> This is not related to your question but  I think there are two things
> going on here with both the old and new code.
> 1) We are closing the old statement
> 2) We are resetting the statement for reuse.
>
> I tend to think that  with the new code although we gain more clarity
> that we are resetting this statement for reuse, we lose the fact that
> the old statement is being closed.  I think maybe something like this
>
> // Because there is no close statement command in DRDA, the  statement
> previously associated
> // with this pkgnamcsn may not have been closed on the server, even
> though it was closed on the client and
> // the section reused.  Getting a request for a new statement with  the
> same pkgnamcsn is how the
> // server finds out that the statement previously associated with this
> pkgnamcsn has been closed.
> //  So when creating a new DRDAStatement for this pkgnamcsn, we
> //1) Retrieve the old statement associated  with this pkgnamcsn and
> close  it
> // 2) Reset the statement state for use with the new DRDAStatement

I will add this comment, slightly modified, because we are now calling
only reset() instead of close in Database.newDrdaStatement. I am
rerunning tests after a minor change. Meantime, I will upload a draft
patch with comments from you and Knut.

Thanks,
Deepa

Mime
View raw message