db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: [DRDA] Question about DRDAStatement.initialize() method
Date Fri, 24 Feb 2006 10:41:18 GMT

>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

DRDAStatement stmt = getDRDAStatement(pkgnamcsn);

        if (stmt != null) {
	    stmt.close();	
            stmt.reset();
            ....







Mime
View raw message