|
From: <jue...@we...> - 2004-07-31 14:48:35
|
Implement a custom SqlMapClientCallback for this, a la:
=20
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
executor.startBatch();
executor.update(...);
executor.update(...);
executor.executeBatch();
}
});
=20
Generally, a SqlMapClientCallback allows you to call any methods on the =
passed-in com.ibatis.sqlmap.client.SqlMapExecutor object. The template =
will automatically convert SQLExceptions to DataAccessExceptions, just =
like it does for the convenience operations defined on the template =
itself.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Stefan D Sookraj
Gesendet: Sa 31.07.2004 16:08
An: spr...@li...
Cc: spr...@li...; cli...@ib...
Betreff: [Springframework-developer] How to do batch with Spring using =
Ibatis
How do you invoke the underlying Ibatis API batch methods from Spring? I =
am
using org.springframework.orm.ibatis.SqlMapClientTemplate, but the =
iBatis
batch API is not exposed. If I use Ibatis API directly, I have to handle
the SQLExceptions. Is this the right way to be able to use the IBatis =
batch
API from Spring? Thank you.
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|