Possible XA bug and fix?

45 views
Skip to first unread message

Curtis Stanford

unread,
Sep 1, 2011, 5:43:27 PM9/1/11
to h2-da...@googlegroups.com
Hi, I've been having trouble using H2 with the  Bitronix transaction manager. If I call setQueryTimeout or setFetchSize on a statement during a transaction, it throws an exception during the next transaction. I seemingly fixed it by removing some lines from the JdbcXAConnection class (around line 327):

//      else if (currentTransaction != null) {
 //           throw new XAException(XAException.XAER_NOTA);
  //      }

Not sure if this is a proper fix but it seems to work for me. I know the XA capability in H2 is not production quality but I thought I'd mention for others seeing the same problem.

Thanks

Curtis

Thomas Mueller

unread,
Sep 5, 2011, 2:59:46 PM9/5/11
to h2-database
Hi,

> Not sure if this is a proper fix

Hm, I also don't know if this is the proper fix. The XA API really is
a bit complicated. But I will test if your change breaks any existing
tests.

Thanks!

Regards,
Thomas

Nikolay Umnikov

unread,
Oct 6, 2016, 2:24:11 PM10/6/16
to H2 Database
I've this issue too, I'm using bitronix + postgres as a remote database + h2 as a local database to store events for implementation eventual consistency. So if I'm doing some operation, then I open a distributed transaction, insert some data to postgres, then create an event and insert the event to h2. Then there is a job that is run asynchronously in a separate thread, which is reading the events from the h2 and reacts accordingly. And I have an exception coming from the same place. Will the issue never be fixed?
Reply all
Reply to author
Forward
0 new messages