Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Simple Hibernate Transaction Rollback test

  1. #11
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,425

    Default

    Are you using InnoDB?
    Last edited by karldmoore; Aug 29th, 2007 at 11:28 AM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  2. #12

    Default

    no I'm not
    is that required for transactions?

  3. #13
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,425

    Default

    I'm not a MySQL expert but I guess that could be the problem.
    To use transactions as demonstrated in the preceding section, you must be using a transaction-safe table type—either InnoDB or BDB. There are various pieces of syntax that will get the same effect.
    http://dev.mysql.com/books/mysqlpres...rial/ch10.html
    Last edited by karldmoore; Aug 29th, 2007 at 11:28 AM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  4. #14

    Default

    tx
    I'll try this first thing tomorrow and let you know if it worked.

    greetz

  5. #15
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,425

    Default

    Quote Originally Posted by TheStijn View Post
    I'll try this first thing tomorrow and let you know if it worked.
    There have been quite a few threads that have been fixed by doing the same thing, hopefully this will be the same in your case .
    Last edited by karldmoore; Aug 29th, 2007 at 11:28 AM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  6. #16
    Join Date
    Mar 2007
    Posts
    7

    Default

    Stijn,

    If you use JUnit to test the transactions, try to manage your transaction from the testclass instead of the service.

    Extend the testclass from AbstractTransactionalSpringContextTests and use the provided TransactionManager from that class instead of managing your transactions from the service.
    Maybe there is something wrong with your transactionmanager instance you provide in the service layer.

    Try it this way to see if that works.

    Koen

  7. #17

    Default

    Quote Originally Posted by karldmoore View Post
    Are you using InnoDB?
    As you probably expected that did the trick!

    tx a lot (all of you) for your help!

    Stijn

  8. #18
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,425

    Default

    Quote Originally Posted by TheStijn View Post
    As you probably expected that did the trick! tx a lot (all of you) for your help!
    Great news, thanks for posting back. Glad it's all working!
    Last edited by karldmoore; Aug 29th, 2007 at 11:27 AM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •