Sreenivasulu,
I have found it best NOT to manage transactions at all; since you're using
Spring, create a
TransactionProxyFactoryBean which can do it for you; it leads to cleaner code
and gives you
greater re-use when you need to compound function calls.
As for your question, transactions are on a thread-level. Each new thread gets
its own
transactional space.
Paul
--- "Konda, Sreenivasulu (Consultant)" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I would like to know expected behaviour of iBATIS JDBC transactions.
> Please see below code snippets and details for the same.
>
> daoManager.startTransaction();
> insert("insertToTable1", Object1);
> insert("insertToTable2", Object2);
> update("updateTable3", Object3);
> delete("deleteFromTable1", Object1);
> daoManager.commitTransaction();
>
> Given above sequence of calls, assume that Thread1 is at
> update("updateTable3", Object3) call and Thread2 too entered into the
> same method where above exists.
>
> Now
>
> 1) Will Thread2 be able to start another transaction before the tx1 got
> committed to DB, which was started by Thread1?
> 2) If Thread2 starts tx2, what would be the behaviour at DB level in
> this scenario?
> 3) If tx1 and tx2 are allowed simultaneously, is this called as nested
> transaction?
>
> BTW, transaction manager type is JDB as you see below XML tags from
> sqlmap_config.xml.
>
> <transactionManager type="JDBC">
> <dataSource type="JNDI">
> <property name="DataSource" value="java:comp/env/jdbc/abcDB"/>
> </dataSource>
> </transactionManager>
>
> Please let me know your comments.
>
> Thanks and regards,
> Sreenivas
>
>
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com