as per jdbc 3 spec one jdbc connection forms one transaction. i.e. when we fetch a database connection via DataSource connection pooling of a application server like weblogic, all the sql statements will be commited when we close the connection. i hope i am right.
now if a methodA in a servlet makes multiple subsequent method calls, wherein each method call fetches its own database connection and performs sql statements; and it is required that either all methods called in methodA be successful together or none,i.e. methodA forms a single transaction, what should i do?use JTA UserTransaction?