db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julius Stroffek (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2871) XATransactionTest gets XaException: Error executing a XAResource.commit(), server returned XAER_PROTO.
Date Mon, 04 Feb 2008 10:01:36 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565298#action_12565298
] 

Julius Stroffek commented on DERBY-2871:
----------------------------------------

Myrna, Kathey, thanks for looking at this issue.

- I'll add the missing javadoc with @see tags.
- I'll change System.err.println to fail(...) and and think about BaseJDBCTestCase.prepareCall
or DatabasePropertyTestSetup.

- I agree that isFinished is a bit confusing. The idea why it is there is that there is a
just a small window in which the cancelation task might be executing and still not obtained
a lock on XATransactionState object. In a meanwhile the transaction might get committed or
rolled back by the application and afterwards the cancellation task will obtain a lock and
run till the completition (see http://java.sun.com/javase/6/docs/api/java/util/TimerTask.html#cancel()
). This property is used just for preventing attempts to do rollbacks of transactions already
committed or rolled back.

Value of isFinished is assigned to false in schedule timeout task beacuse if the global transaction
is started with EmbedXAResource.start(TMNOFLAGS) the method XATransactionState.start(TMNOFLAGS)
is not called but scheduleTimeoutTask is called if the timeout is required.

So there are two possible options how to deal whith this:
a) rename isFinished to something less confusing like 'performTimeoutRollback', etc.
b) or change the logic so XATransactionState.start would be called also for TMNOFLAGS and
isFinished would behave as expected from its name.

Thanks for your opinions.

> XATransactionTest gets XaException: Error executing a XAResource.commit(), server returned
XAER_PROTO.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2871
>                 URL: https://issues.apache.org/jira/browse/DERBY-2871
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.4
>         Environment: OS: HP-UX v1.11 i 
> JDK: HP 1.5.0.03 
>            Reporter: Henri van de Scheur
>            Assignee: Julius Stroffek
>            Priority: Minor
>         Attachments: d2871-test.diff, d2871-test.stat, d2871.diff, d2871.diff, d2871.stat,
d2871.stat, DERBY-2871_020108.diff
>
>
> Method: org.apache.derbyTesting.functionTests.tests.jdbcapi.XATransactionTest
> Signature:
> %XAER_PROTO : Error executing a XAResource.commit(), server returned XAER_PROTO%
> Also see: http://dbtg.thresher.com/derby/test/10.3.1.0_RC/jvm1.5/testing/testlog/hpux/548006-suitesAll_diff.txt

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message