You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by D-Light <dl...@newmail.ru> on 2005/01/18 15:11:16 UTC
Same connection for JDBC and SqlMap
Hello,
I want to use both JDBC and SqlMap DAOs on the same data source,
but it seems that they work with different connections, so when I
query for data by SqlMap in the middle of explicit UPDATE or INSERT
JDBC transaction, it shows old values.
Is it possible to make them use the same connection?
--
Best regards,
Andy Light mailto:dlight@newmail.ru
Re: Same connection for JDBC and SqlMap
Posted by Clinton Begin <cl...@gmail.com>.
Yep. Just write your JDBC DAO (extending JdbcDaoTemplate) and
register it under the SQL Map transaction manager in the dao.xml. It
will work. Also, be sure to enable commitRequired="true" on the
transaction manager in the SQL Map config.
Clinton
On Tue, 18 Jan 2005 20:11:16 +0600, D-Light <dl...@newmail.ru> wrote:
> Hello,
>
> I want to use both JDBC and SqlMap DAOs on the same data source,
> but it seems that they work with different connections, so when I
> query for data by SqlMap in the middle of explicit UPDATE or INSERT
> JDBC transaction, it shows old values.
> Is it possible to make them use the same connection?
>
> --
> Best regards,
> Andy Light mailto:dlight@newmail.ru
>
>