I can be wrong but I thought that if you extends your dao class with
SqlMapClientDaoSupport the code to do the Sql query will be;
getSqlMapClientTemplate().update, getSqlMapClientTemplate().queryforlist, ..

While when you use 'extends SqlMapClientTemplate' the code stays the same as
it was in jpetstore;
Update, queryforlist, ...



-----Original Message-----
From: Zoran Avtarovski [mailto:[EMAIL PROTECTED] 
Sent: 06 June 2007 04:07 PM
To: iBatis Java Mail List
Subject: Purpose of sqlClientTemplate

I've been looking the the instructions on migrating from Ibatis DAO to
Spring DAO on the wiki
http://opensource.atlassian.com/confluence/oss/display/IBATIS/Converting+iBA
TIS+DAO+to+Spring+DAO

The DAO classes extend
org.springframework.orm.ibatis.support.SqlMapClientDaoSupport which has
support for injection of both a sqlMapClient object and a
sqlMapClientTemplate Object.

On the wiki I notice that the sqlMapClientTemplate is defined but never
used. The DAO objects have the sqlMapClient injected.

Is there a preference for one over the other (transaction support, speed,
memory, etc)?

Isn't it superfluous to have the sqlMapClientTemplate definition if it's not
used?

I'm trying to get a better idea of how best to use spring.

Z.



Reply via email to