We are already are in agreement that the application layer (which calls iBATIS) has to close the cursor which is an out parameter.

The easiest would be that the part in your application that reads from the cursor closes it at the moment it reaches "the end of the cursor"... this would be something as:
   rs.close()
where rs is the ResultSet/cursor which is your out parameter.

Regards,
Sven

[EMAIL PROTECTED] wrote:

Hi Sven,

Thanks for your reply.I found in the discussion forums that iBATIS will close the cursor for the list, in the application layer we have to close the resultCursor passed by the sp as OUT param.

Iam not clear about how to implement this.Please suggest me or send me a sample code.

Your help would be highly appreciated.

Regards,
Shiuli Deb
Tata Consultancy Services Limited
415/21-24, Kumaran Nagar,
Sholinganallur,
Old Mahabalipuram,
Chennai - 600 119,Tamil Nadu
India
Cell:- 9884394355
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com



Sven Boden <[EMAIL PROTECTED]> 02/11/2006 04:26 PM
Please respond to
[email protected]


To
[EMAIL PROTECTED]
cc
[email protected]
Subject
support question JIRA-252/253/354






Shiulu,

Don't create JIRA's for support questions, we have some mailing lists for those (in the cc: of this mail). Information from the JIRA at the end of this mail.

So let me recap your problem to see whether we're talking about the same thing. You call stored procedure sp_gettransactionsqueue() with queryForList which gives you a list of QueueBeans. And also gives you a resultCursor back as OUT param (also in a QueueBean but that's beside the point). iBATIS will close the cursor for the list, you have to close the resultCursor passed to you as OUT param. For the place where the closing of the first ResultSet happens in the iBATIS source code, normally your queryForList will in the end pass through com.ibatis.sqlmap.engine.execution.SQLExecutor.execeuteQuery(), which closes the ResultSet at the end of the method. Look at: http://svn.apache.org/repos/asf/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java


If you have further questions use the mailing list, we will close the JIRA's.

Regards,
Sven

--------------------------------
From IBATIS JIRA-252:
resultCursor we have declared of type java.sql.ResultSet. But from our application we are not referring the resultcursor. We are using method queryForList which returns the result as List with number of beans based on number of records. Since we are not referring the resultset from our application, we are not able to find out where to close the result cursor.

<resultMap id="getQueueResult" class="QueueBean">
<result property="confirmationNo" column="txnid" />
<result property="assocName" column="initid" />
<result property="transType" column="txntypedesc" />
<result property="createTime" column="txninitdate" />
<result property="amount" column="amount" />
<result property="moneyMarket" column="moneymkt" />
<result property="status" column="txnstatus" />
<result property="transTypeCode" column="txntypecode" />
<result property="transStsCode" column="txnstscode" />
<result property="elapsedTime" column="elapsetime" />
</resultMap>

<parameterMap id="getQueueParam" class="QueueBean">
<parameter property="initiatorId" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/> <parameter property="userRole" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/> <parameter property="team" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/> <parameter property="subTeam" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/> <parameter property="sortBy" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/> <parameter property="sortOrder" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/>
<parameter property="resultCursor" jdbcType="ORACLECURSOR" mode="OUT" />
</parameterMap>
<procedure id="getPendingQueueDetails" parameterMap = "getQueueParam" resultMap="getQueueResult">
{ call sp_gettransactionsqueue(?,?,?,?,?,?,?) }
</procedure>


ForwardSourceID:NT00002EA6

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

Reply via email to