List:MySQL and Java« Previous MessageNext Message »
From:Mark Matthews Date:May 21 2003 2:36pm
Subject:Re: 2 or more transactions in one connection
View as plain text  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Björn Lorenz wrote:

> Hi everyone,
>
> for the java-appIication, I am working on, I use mysql2.0.14 to
connect to mysql(3.23.53) with innoDB tables.
> Wanting to ensure concurrency and consistency, I wonder what happens
if there are two transactions "running" on one connection and then one
transaction is comitted before the other transaction has finished. Is
the other one committed also? Or are there any transactionIDs (or
anything else) to identify the transactions?

That is an impossible situation. Neither JDBC or MySQL allow you to have
more than one transaction _per_connection_. Transactions are 'scoped' to
connections in JDBC (and in most databases, unless you start talking
about XA).

	-Mark

- --
For technical support contracts, visit https://order.mysql.com/?ref=mmma

    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews <mark@stripped>
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, SW Dev. Manager - J2EE/Windows
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
        <___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+y3LCtvXNTca6JD8RAgClAJ9WL2WkAVOXPRmbRuUKc9A6GHx0+gCgjC2k
LzlCIjMD/HkmvQ6g4PpFgFc=
=X74e
-----END PGP SIGNATURE-----

Thread
2 or more transactions in one connection Björn Lorenz21 May
  • Re: 2 or more transactions in one connectionMark Matthews21 May
  • Re: 2 or more transactions in one connectionFrank Gates22 May