lbehnke / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

JTA - JdbcXAConnection.start() does not support TMJOIN #189

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Use the XADatasource and make use of TMJOIN.
2. This will fails with return code XAER_NOTA.

What is the expected output? What do you see instead?

I've exspected to behave like e.g. Postgres XAConnection which does support
TMJOIN.

What version of the product are you using? On what operating system, file
system, and virtual machine?

1.6 JVM Sun, OpenJDK - H2 1.2.133, OS Ubuntu 10.04, Ext3 FS.

Do you know a workaround?

Yes - see the attached patch. I don't know if its the best correct solution
(as i am not a developer of h2) - but looking at e.g. postgresql this looks
like the way to go - after making this modification, my testcase runs.

How important/urgent is the problem for you?

Important to make use of JTA with H2.

In your view, is this a defect or a feature request?

This is a defect.

Please provide any additional information below.

Used Atomikos as JTA TM.

Original issue reported on code.google.com by torsten....@googlemail.com on 14 Apr 2010 at 9:34

Attachments:

GoogleCodeExporter commented 9 years ago
Hi

Thanks a lot! I will try it out, and most likely apply the patch in the next 
release.
Do you have a test case to verify it's fixed?

Regards,
Thomas

Original comment by thomas.t...@gmail.com on 20 Apr 2010 at 6:49

GoogleCodeExporter commented 9 years ago
Hi,

There was a NullPointerException running the test suite, so I changed your 
patch to:

if (flags == TMJOIN) {
    if (currentTransaction != null && !currentTransaction.equals(xid)) {
        throw new XAException(XAException.XAER_RMERR);
    }

Is this correct?

Regards,
Thomas

Original comment by thomas.t...@gmail.com on 22 Apr 2010 at 6:37

GoogleCodeExporter commented 9 years ago
Fixed in version 1.2.134

Original comment by thomas.t...@gmail.com on 23 Apr 2010 at 5:25