ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rao, Satish" <satish....@fmr.com>
Subject RE: Performance issue with CustomTypeHandler
Date Tue, 18 Oct 2005 20:10:15 GMT
Is anyone facing a similar issue. Please suggest.

	-----Original Message-----
	From: Rao, Satish 
	Sent: Tuesday, October 18, 2005 1:44 PM
	To: user-java@ibatis.apache.org
	Subject: Performance issue with CustomTypeHandler
	
	


	I am using ORACLECURSOR in my sqlmap and using the following
TypeHandler code. 

	Here's the sqlmap entry 
	                <parameter property="offerRS"
jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT"
typeHandler="RefCursorHandler"/>

	And here's the handler code 
	public class RefCursorHandler implements TypeHandlerCallback { 

	        public Object getResult(ResultGetter arg0) throws
SQLException { 

	                this.result = (ResultSet)arg0.getObject(); 
	                return this.result; 
	        } 

	The statement (ResultSet)arg0.getObject(); takes a long time to
return (even for 2 rows). 

	Do you see any issue with the code? 
	I debugged this and eventually found that the above statement
calls the following method within CallableStatementResultSet

	  public Object getObject(int columnIndex) throws SQLException {

	    return cs.getObject(columnIndex); 
	  } 

	This in turn calls OracleCallableStatement. This part takes a
long time to return. 

	I am using thin driver. 

	Please suggest. I need to get this resolved ASAP. 

	Thanks, 
	Satish 


Mime
View raw message