ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harish Ram <hari...@gmail.com>
Subject Performance with iBatis/DAO/Spring
Date Sat, 25 Nov 2006 05:53:13 GMT
Hi 

Let me first apologize for bringing this up again. Unfortunately, I had to since
I did not see any answers to this thread. And the project is on hold because of
the performance issue :{  Any help is kindly appreciated.

I am using Spring/DAO/iBatis for db inserts and am finding this "almost an order
of magnitude" slower to jdbc.

I have a single DaoManager for multiple threads and each thread starts with 
=====
daoManager.startTransaction();
getSqlMapExecutor().startBatch();
getSqlMapExecutor().insert("MyInsertId", mymap);
daoManager.commitTransaction();
finally{
daoManager.endTranasaction();
}
=========

Even when I am debugging, I can clearly see a timed hesitation at
=========
2006-11-24 05:09:06,757 DEBUG [com.ibatis.common.jdbc.SimpleDataSource] Checked
out connection 13060580 from pool.
2006-11-24 05:09:06,836 DEBUG [java.sql.Connection] {conn-114583} Connection
=========
And then the insert statment is executed..

My SqlMapConfig file is as follows

=======================
 <settings
     lazyLoadingEnabled="true"
     cacheModelsEnabled="true"
     enhancementEnabled="true"
     maxRequests="512"
     maxSessions="128"
     maxTransactions="32"
 />


 <transactionManager type="JDBC">
   <dataSource type="SIMPLE">
     <property name="JDBC.Driver" value="com.sybase.jdbc3.jdbc.SybDriver"/>
     <property name="JDBC.ConnectionURL" value="${url}"/>
     <property name="JDBC.Username" value="${username}"/>
     <property name="JDBC.Password" value="${password}"/>
     <property name="JDBC.DefaultAutoCommit" value="true"/>
     <property name="Pool.MaximumActiveConnections" value="20"/>
     <property name="Pool.MaximumIdleConnections" value="10"/>
     <property name="Pool.MaximumCheckoutTime" value="120000"/>
     <property name="Pool.TimeToWait" value="500"/>
     <property name="Pool.PingQuery" value="select * from dual"/>
     <property name="Pool.PingEnabled" value="false"/>
     <property name="Pool.PingConnectionsOlderThan" value="1"/>
     <property name="Pool.PingConnectionsNotUsedFor" value="1"/>
   </dataSource>
 </transactionManager>
===============================
QUESTION is, am I missing anything.. Is there anything I can do to speed up the
transaction. 
QUESTION, is there anything that I can do to ***reduce time to get connection
from connection pool ***?
Any help is kindly appreciated

sincerely
Harish


Mime
View raw message