[
https://issues.apache.org/jira/browse/DERBY-2508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julius Stroffek updated DERBY-2508:
-----------------------------------
Attachment: d2432_beta1.stat
d2432_beta1.diff
I have created a some patch for this issue.
I used Monitor.getMonitor().getTimerFactory().getCancellationTimer() to fire
the cancellation event. The time is measured from the transaction start
(invoking XAResource.start() method) with the corresponding Xid.
The cancellation task is called with the instances of the corresponding
XATransactionState and EmbedXAResource where the transaction was started. After
the cancellation event is fired the transaction state is checked. If the
transaction is still associated with the same EmbedXAResource instance it is
disassociated first. If the transaction is associated with the different
XAResource instance we will wait for the transaction to be disassociated first.
---
Currently, I have the following problems/questions:
When the transaction is still associated with any resource there might be some
running queries. How can I safely cancel those running queries (of course from
different thread)? Is there any mechanism for that?
Currently, when the cancellation event finishes derby does not know anything
about the transaction and all the exceptions thrown after that are like the
transaction was never known before. It might be difficult for the user to find
out what is going on. Would it make sense to perform the cancellation in two
phases. First phase would rollback the transaction but would not remove the
transaction state from the global transaction table. This would happen in the
second phase. However a new cancellation task would be required for this.
I ran derbyall and Suites.All without failures.
I appreciate any comments.
> Implement the XA transaction support for embedded driver.
> ---------------------------------------------------------
>
> Key: DERBY-2508
> URL: https://issues.apache.org/jira/browse/DERBY-2508
> Project: Derby
> Issue Type: Sub-task
> Affects Versions: 10.2.2.0
> Reporter: Julius Stroffek
> Assigned To: Julius Stroffek
> Fix For: 10.3.0.0
>
> Attachments: d2432_beta1.diff, d2432_beta1.stat
>
>
> Implement the XA transaction support for embedded driver in EmbedXAResource.
> Implement functions XAResource.setTransactionTimeout and
> XAResource.getTransactionTimeout and add the code to cancel the transaction
> after the specified period of time.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.