Hi,
i think that the statements are executed in 2 transaction because your
connection pool contains more than one connection.
To execute the two in the same transaction i suppose you should do something
like this:
<your_sqlMap_cleint_instance>.startTransaction();
<your_sqlMap_cleint_instance>.queryForList("*selectTestObject*");
<your_sqlMap_cleint_instance>.endTransaction();

This is what i will do, i hope this coul help
 Andrea

On Tue, Jan 26, 2010 at 1:29 PM, Tom Henricksen <t...@a-t-g.com> wrote:

>
>
> I’m calling the select statement *selectTestObject* in a transaction but
> it is very surprising that select=*"TEMPVsp.selectById" *runs on a
> different connection. Is there a way that* *select=*"TEMPVsp.selectById” 
> *executes
> in the same transaction as* selectTestObject. *
>
>
>
> <resultMap class=*"Test"* id=*"TestMap"*>
>
>             <result column=*"ID"* property=*"id"*/>
>
>             <result column=*"TEMPID"* property=*"temp"* select=*
> "TEMPVsp.selectById"*/>
>
> </resultMap>
>
>
>
> <select id=*"selectTestObject"* parameterClass=*"map"* resultMap=*
> "TestMap"*>
>
>
>
>                   SELECT
>
>                         ID,
>
>                         *TEMPID*
>
>                   FROM
>
>                         TESTTABLE
>
>                   WHERE
>
>                       ID = #id#
>
>
>
> </select>
>
>
>
> Thanks,
>
> PK
>

Reply via email to