#487 RFE: support mysql transactions retry

open
nobody
None
5
2014-09-13
2004-04-17
No

Hi

Under heavy load Mysql/INNODB can at any moment throw
SQL deadlock exception, even on a simple attempt to
insert a single row, and they say that there's "nothing
dangerous" and code must be ready to restart
transaction at any moment:

http://dev.mysql.com/doc/mysql/en/Innodb_deadlocks.html

See example 4.1 (section 4.4) here:

http://dev.mysql.com/doc/connector/j/en/index.html

As far as I understand, container should take care of
such situations and behave much like in case of
retriable ADE. There's nothing CMT entity bean can do
here itself except for constructing and throwing
vendor-specific ADE.

Thanks

Discussion

  • Konstantin Sobolev

    Logged In: YES
    user_id=118051

    I meant CMP entity bean. BMP can't do anything either.

     
  • Adrian Brock

    Adrian Brock - 2004-04-19

    Logged In: YES
    user_id=9459

    There is already support for arbitrary retry handlers in
    jboss-3.2.4RC1
    See the testsuite for examples if you cannot wait for this to be
    documented.
    Maybe you can contribute a MySQL deadlock handler?

     
  • Konstantin Sobolev

    Logged In: YES
    user_id=118051

    Here it is. Please place in the appropriate package.
    Unfortunately SF doesn't allow me to change the "Data Type".

    Thanks

     
  • Adrian Brock

    Adrian Brock - 2004-04-22

    Logged In: YES
    user_id=9459

    Loops are more efficient than recursion, they use less stack.
    That is why most parsers use tables instead of recursive decent.

    What is the purpose of the commented out code?

     
  • Konstantin Sobolev

    Logged In: YES
    user_id=118051

    I know about recursion and loops; I decided to use recursion
    because it won't be too deep, only 2-3 steps, and at the
    same time it is more compact and easy to read.

    Commented code can be safely removed. It is just and old
    variant we used before we found 'official' MySQL exampe.

     

Log in to post a comment.