ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject Re: Performance with iBatis/DAO/Spring
Date Sat, 25 Nov 2006 22:31:28 GMT
Before we solve the performance problem, can we ask why you're using Spring
with iBATIS DAO?

If you're using Spring, you should use Spring DAO.  My first concern would
be that you have 3 frameworks trying to compete to manage transactions.  You
can reduce it to one by just using Spring DAO with iBATIS SQL Maps (ditch
iBATIS DAO).

Cheers,
Clinton

On 11/24/06, Harish Ram <harijyo@gmail.com> wrote:
>
> 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